code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static String decrypt(String base64Encrypted) { if (base64Encrypted != null) { byte[] enc = Base64.decode(base64Encrypted, Base64.DEFAULT); byte[] result = doFinal(Base64.decode(getBase64Key(), Base64.DEFAULT), Cipher.DECRYPT_MODE, enc); return new String(result); } return null; }
class class_name[name] begin[{] method[decrypt, return_type[type[String]], modifier[public static], parameter[base64Encrypted]] begin[{] if[binary_operation[member[.base64Encrypted], !=, literal[null]]] begin[{] local_variable[type[byte], enc] local_variable[type[byte], result] return[ClassCreator(arguments=[MemberReference(member=result, 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=String, sub_type=None))] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[decrypt] operator[SEP] identifier[String] identifier[base64Encrypted] operator[SEP] { Keyword[if] operator[SEP] identifier[base64Encrypted] operator[!=] Other[null] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[enc] operator[=] identifier[Base64] operator[SEP] identifier[decode] operator[SEP] identifier[base64Encrypted] , identifier[Base64] operator[SEP] identifier[DEFAULT] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[result] operator[=] identifier[doFinal] operator[SEP] identifier[Base64] operator[SEP] identifier[decode] operator[SEP] identifier[getBase64Key] operator[SEP] operator[SEP] , identifier[Base64] operator[SEP] identifier[DEFAULT] operator[SEP] , identifier[Cipher] operator[SEP] identifier[DECRYPT_MODE] , identifier[enc] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[String] operator[SEP] identifier[result] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public <M extends BytesReader<V> & BytesWriter<? super V>> ChronicleMapBuilder<K, V> valueMarshaller(@NotNull M marshaller) { return valueMarshallers(marshaller, marshaller); }
class class_name[name] begin[{] method[valueMarshaller, return_type[type[ChronicleMapBuilder]], modifier[public], parameter[marshaller]] begin[{] return[call[.valueMarshallers, parameter[member[.marshaller], member[.marshaller]]]] end[}] END[}]
Keyword[public] operator[<] identifier[M] Keyword[extends] identifier[BytesReader] operator[<] identifier[V] operator[>] operator[&] identifier[BytesWriter] operator[<] operator[?] Keyword[super] identifier[V] operator[>] operator[>] identifier[ChronicleMapBuilder] operator[<] identifier[K] , identifier[V] operator[>] identifier[valueMarshaller] operator[SEP] annotation[@] identifier[NotNull] identifier[M] identifier[marshaller] operator[SEP] { Keyword[return] identifier[valueMarshallers] operator[SEP] identifier[marshaller] , identifier[marshaller] operator[SEP] operator[SEP] }
public static ns_ns_ip add(nitro_service client, ns_ns_ip resource) throws Exception { resource.validate("add"); return ((ns_ns_ip[]) resource.perform_operation(client, "add"))[0]; }
class class_name[name] begin[{] method[add, return_type[type[ns_ns_ip]], modifier[public static], parameter[client, resource]] begin[{] call[resource.validate, parameter[literal["add"]]] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="add")], member=perform_operation, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[None], name=ns_ns_ip, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ns_ns_ip] identifier[add] operator[SEP] identifier[nitro_service] identifier[client] , identifier[ns_ns_ip] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[resource] operator[SEP] identifier[validate] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[ns_ns_ip] operator[SEP] operator[SEP] operator[SEP] identifier[resource] operator[SEP] identifier[perform_operation] operator[SEP] identifier[client] , literal[String] operator[SEP] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] }
private void createMonitor(LinkListener l) throws KNXException { final KNXMediumSettings medium = (KNXMediumSettings) options.get("medium"); if (options.containsKey("serial")) { final String p = (String) options.get("serial"); try { m = new KNXNetworkMonitorFT12(Integer.parseInt(p), medium); } catch (final NumberFormatException e) { m = new KNXNetworkMonitorFT12(p, medium); } } else { // create local and remote socket address for monitor link final InetSocketAddress local = createLocalSocket((InetAddress) options .get("localhost"), (Integer) options.get("localport")); final InetSocketAddress host = new InetSocketAddress((InetAddress) options .get("host"), ((Integer) options.get("port")).intValue()); // create the monitor link, based on the KNXnet/IP protocol // specify whether network address translation shall be used, // and tell the physical medium of the KNX network m = new KNXNetworkMonitorIP(local, host, options.containsKey("nat"), medium); } // add the log writer for monitor log events LogManager.getManager().addWriter(m.getName(), w); // on console we want to have all possible information, so enable // decoding of a received raw frame by the monitor link m.setDecodeRawFrames(true); // listen to monitor link events m.addMonitorListener(l); // we always need a link closed notification (even with user supplied listener) m.addMonitorListener(new LinkListener() { public void indication(FrameEvent e) {} public void linkClosed(CloseEvent e) { System.out.println("network monitor exit, " + e.getReason()); synchronized (NetworkMonitor.this) { NetworkMonitor.this.notify(); } } }); }
class class_name[name] begin[{] method[createMonitor, return_type[void], modifier[private], parameter[l]] begin[{] local_variable[type[KNXMediumSettings], medium] if[call[options.containsKey, parameter[literal["serial"]]]] begin[{] local_variable[type[String], p] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), MemberReference(member=medium, 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=KNXNetworkMonitorFT12, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=medium, 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=KNXNetworkMonitorFT12, sub_type=None))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) else begin[{] local_variable[type[InetSocketAddress], local] local_variable[type[InetSocketAddress], host] assign[member[.m], ClassCreator(arguments=[MemberReference(member=local, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=host, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="nat")], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=options, selectors=[], type_arguments=None), MemberReference(member=medium, 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=KNXNetworkMonitorIP, sub_type=None))] end[}] call[LogManager.getManager, parameter[]] call[m.setDecodeRawFrames, parameter[literal[true]]] call[m.addMonitorListener, parameter[member[.l]]] call[m.addMonitorListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[], documentation=None, modifiers={'public'}, name=indication, parameters=[FormalParameter(annotations=[], modifiers=set(), name=e, type=ReferenceType(arguments=None, dimensions=[], name=FrameEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="network monitor exit, "), operandr=MethodInvocation(arguments=[], member=getReason, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), SynchronizedStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=NetworkMonitor, selectors=[MethodInvocation(arguments=[], member=notify, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], label=None, lock=This(postfix_operators=[], prefix_operators=[], qualifier=NetworkMonitor, selectors=[]))], documentation=None, modifiers={'public'}, name=linkClosed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=e, type=ReferenceType(arguments=None, dimensions=[], name=CloseEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LinkListener, sub_type=None))]] end[}] END[}]
Keyword[private] Keyword[void] identifier[createMonitor] operator[SEP] identifier[LinkListener] identifier[l] operator[SEP] Keyword[throws] identifier[KNXException] { Keyword[final] identifier[KNXMediumSettings] identifier[medium] operator[=] operator[SEP] identifier[KNXMediumSettings] operator[SEP] identifier[options] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[options] operator[SEP] identifier[containsKey] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[p] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[options] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[m] operator[=] Keyword[new] identifier[KNXNetworkMonitorFT12] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[p] operator[SEP] , identifier[medium] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[NumberFormatException] identifier[e] operator[SEP] { identifier[m] operator[=] Keyword[new] identifier[KNXNetworkMonitorFT12] operator[SEP] identifier[p] , identifier[medium] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[final] identifier[InetSocketAddress] identifier[local] operator[=] identifier[createLocalSocket] operator[SEP] operator[SEP] identifier[InetAddress] operator[SEP] identifier[options] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , operator[SEP] identifier[Integer] operator[SEP] identifier[options] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[InetSocketAddress] identifier[host] operator[=] Keyword[new] identifier[InetSocketAddress] operator[SEP] operator[SEP] identifier[InetAddress] operator[SEP] identifier[options] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[options] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m] operator[=] Keyword[new] identifier[KNXNetworkMonitorIP] operator[SEP] identifier[local] , identifier[host] , identifier[options] operator[SEP] identifier[containsKey] operator[SEP] literal[String] operator[SEP] , identifier[medium] operator[SEP] operator[SEP] } identifier[LogManager] operator[SEP] identifier[getManager] operator[SEP] operator[SEP] operator[SEP] identifier[addWriter] operator[SEP] identifier[m] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[w] operator[SEP] operator[SEP] identifier[m] operator[SEP] identifier[setDecodeRawFrames] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[m] operator[SEP] identifier[addMonitorListener] operator[SEP] identifier[l] operator[SEP] operator[SEP] identifier[m] operator[SEP] identifier[addMonitorListener] operator[SEP] Keyword[new] identifier[LinkListener] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[indication] operator[SEP] identifier[FrameEvent] identifier[e] operator[SEP] { } Keyword[public] Keyword[void] identifier[linkClosed] operator[SEP] identifier[CloseEvent] identifier[e] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getReason] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[NetworkMonitor] operator[SEP] Keyword[this] operator[SEP] { identifier[NetworkMonitor] operator[SEP] Keyword[this] operator[SEP] identifier[notify] operator[SEP] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
public GetMetricStatisticsRequest withStatistics(Statistic... statistics) { com.amazonaws.internal.SdkInternalList<String> statisticsCopy = new com.amazonaws.internal.SdkInternalList<String>(statistics.length); for (Statistic value : statistics) { statisticsCopy.add(value.toString()); } if (getStatistics() == null) { setStatistics(statisticsCopy); } else { getStatistics().addAll(statisticsCopy); } return this; }
class class_name[name] begin[{] method[withStatistics, return_type[type[GetMetricStatisticsRequest]], modifier[public], parameter[statistics]] begin[{] local_variable[type[com], statisticsCopy] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=statisticsCopy, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=statistics, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Statistic, sub_type=None))), label=None) if[binary_operation[call[.getStatistics, parameter[]], ==, literal[null]]] begin[{] call[.setStatistics, parameter[member[.statisticsCopy]]] else begin[{] call[.getStatistics, parameter[]] end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[GetMetricStatisticsRequest] identifier[withStatistics] operator[SEP] identifier[Statistic] operator[...] identifier[statistics] operator[SEP] { identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] identifier[statisticsCopy] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[statistics] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Statistic] identifier[value] operator[:] identifier[statistics] operator[SEP] { identifier[statisticsCopy] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[getStatistics] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[setStatistics] operator[SEP] identifier[statisticsCopy] operator[SEP] operator[SEP] } Keyword[else] { identifier[getStatistics] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[statisticsCopy] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
protected Request<CreateBucketRequest> addIAMHeaders(Request<CreateBucketRequest> request, CreateBucketRequest createBucketRequest){ if ((null != this.awsCredentialsProvider ) && (this.awsCredentialsProvider.getCredentials() instanceof IBMOAuthCredentials)) { if (null != createBucketRequest.getServiceInstanceId()) { request.addHeader(Headers.IBM_SERVICE_INSTANCE_ID, createBucketRequest.getServiceInstanceId()); if (null != createBucketRequest.getEncryptionType()) { request.addHeader(Headers.IBM_SSE_KP_ENCRYPTION_ALGORITHM, createBucketRequest.getEncryptionType().getKmsEncryptionAlgorithm()); request.addHeader(Headers.IBM_SSE_KP_CUSTOMER_ROOT_KEY_CRN, createBucketRequest.getEncryptionType().getIBMSSEKMSCustomerRootKeyCrn()); } } else { IBMOAuthCredentials oAuthCreds = (IBMOAuthCredentials)this.awsCredentialsProvider.getCredentials(); if (oAuthCreds.getServiceInstanceId() != null) { request.addHeader(Headers.IBM_SERVICE_INSTANCE_ID, oAuthCreds.getServiceInstanceId()); if (null != createBucketRequest.getEncryptionType()) { request.addHeader(Headers.IBM_SSE_KP_ENCRYPTION_ALGORITHM, createBucketRequest.getEncryptionType().getKmsEncryptionAlgorithm()); request.addHeader(Headers.IBM_SSE_KP_CUSTOMER_ROOT_KEY_CRN, createBucketRequest.getEncryptionType().getIBMSSEKMSCustomerRootKeyCrn()); } } } } return request; }
class class_name[name] begin[{] method[addIAMHeaders, return_type[type[Request]], modifier[protected], parameter[request, createBucketRequest]] begin[{] if[binary_operation[binary_operation[literal[null], !=, THIS[member[None.awsCredentialsProvider]]], &&, binary_operation[THIS[member[None.awsCredentialsProvider]call[None.getCredentials, parameter[]]], instanceof, type[IBMOAuthCredentials]]]] begin[{] if[binary_operation[literal[null], !=, call[createBucketRequest.getServiceInstanceId, parameter[]]]] begin[{] call[request.addHeader, parameter[member[Headers.IBM_SERVICE_INSTANCE_ID], call[createBucketRequest.getServiceInstanceId, parameter[]]]] if[binary_operation[literal[null], !=, call[createBucketRequest.getEncryptionType, parameter[]]]] begin[{] call[request.addHeader, parameter[member[Headers.IBM_SSE_KP_ENCRYPTION_ALGORITHM], call[createBucketRequest.getEncryptionType, parameter[]]]] call[request.addHeader, parameter[member[Headers.IBM_SSE_KP_CUSTOMER_ROOT_KEY_CRN], call[createBucketRequest.getEncryptionType, parameter[]]]] else begin[{] None end[}] else begin[{] local_variable[type[IBMOAuthCredentials], oAuthCreds] if[binary_operation[call[oAuthCreds.getServiceInstanceId, parameter[]], !=, literal[null]]] begin[{] call[request.addHeader, parameter[member[Headers.IBM_SERVICE_INSTANCE_ID], call[oAuthCreds.getServiceInstanceId, parameter[]]]] if[binary_operation[literal[null], !=, call[createBucketRequest.getEncryptionType, parameter[]]]] begin[{] call[request.addHeader, parameter[member[Headers.IBM_SSE_KP_ENCRYPTION_ALGORITHM], call[createBucketRequest.getEncryptionType, parameter[]]]] call[request.addHeader, parameter[member[Headers.IBM_SSE_KP_CUSTOMER_ROOT_KEY_CRN], call[createBucketRequest.getEncryptionType, parameter[]]]] else begin[{] None end[}] else begin[{] None end[}] end[}] else begin[{] None end[}] return[member[.request]] end[}] END[}]
Keyword[protected] identifier[Request] operator[<] identifier[CreateBucketRequest] operator[>] identifier[addIAMHeaders] operator[SEP] identifier[Request] operator[<] identifier[CreateBucketRequest] operator[>] identifier[request] , identifier[CreateBucketRequest] identifier[createBucketRequest] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] Other[null] operator[!=] Keyword[this] operator[SEP] identifier[awsCredentialsProvider] operator[SEP] operator[&&] operator[SEP] Keyword[this] operator[SEP] identifier[awsCredentialsProvider] operator[SEP] identifier[getCredentials] operator[SEP] operator[SEP] Keyword[instanceof] identifier[IBMOAuthCredentials] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[!=] identifier[createBucketRequest] operator[SEP] identifier[getServiceInstanceId] operator[SEP] operator[SEP] operator[SEP] { identifier[request] operator[SEP] identifier[addHeader] operator[SEP] identifier[Headers] operator[SEP] identifier[IBM_SERVICE_INSTANCE_ID] , identifier[createBucketRequest] operator[SEP] identifier[getServiceInstanceId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[createBucketRequest] operator[SEP] identifier[getEncryptionType] operator[SEP] operator[SEP] operator[SEP] { identifier[request] operator[SEP] identifier[addHeader] operator[SEP] identifier[Headers] operator[SEP] identifier[IBM_SSE_KP_ENCRYPTION_ALGORITHM] , identifier[createBucketRequest] operator[SEP] identifier[getEncryptionType] operator[SEP] operator[SEP] operator[SEP] identifier[getKmsEncryptionAlgorithm] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[addHeader] operator[SEP] identifier[Headers] operator[SEP] identifier[IBM_SSE_KP_CUSTOMER_ROOT_KEY_CRN] , identifier[createBucketRequest] operator[SEP] identifier[getEncryptionType] operator[SEP] operator[SEP] operator[SEP] identifier[getIBMSSEKMSCustomerRootKeyCrn] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[IBMOAuthCredentials] identifier[oAuthCreds] operator[=] operator[SEP] identifier[IBMOAuthCredentials] operator[SEP] Keyword[this] operator[SEP] identifier[awsCredentialsProvider] operator[SEP] identifier[getCredentials] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[oAuthCreds] operator[SEP] identifier[getServiceInstanceId] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[request] operator[SEP] identifier[addHeader] operator[SEP] identifier[Headers] operator[SEP] identifier[IBM_SERVICE_INSTANCE_ID] , identifier[oAuthCreds] operator[SEP] identifier[getServiceInstanceId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[createBucketRequest] operator[SEP] identifier[getEncryptionType] operator[SEP] operator[SEP] operator[SEP] { identifier[request] operator[SEP] identifier[addHeader] operator[SEP] identifier[Headers] operator[SEP] identifier[IBM_SSE_KP_ENCRYPTION_ALGORITHM] , identifier[createBucketRequest] operator[SEP] identifier[getEncryptionType] operator[SEP] operator[SEP] operator[SEP] identifier[getKmsEncryptionAlgorithm] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[addHeader] operator[SEP] identifier[Headers] operator[SEP] identifier[IBM_SSE_KP_CUSTOMER_ROOT_KEY_CRN] , identifier[createBucketRequest] operator[SEP] identifier[getEncryptionType] operator[SEP] operator[SEP] operator[SEP] identifier[getIBMSSEKMSCustomerRootKeyCrn] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[return] identifier[request] operator[SEP] }
public ServiceFuture<Void> deleteCertificateAsync(String resourceGroupName, String certificateOrderName, String name, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name), serviceCallback); }
class class_name[name] begin[{] method[deleteCertificateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, certificateOrderName, name, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.deleteCertificateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.certificateOrderName], member[.name]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[Void] operator[>] identifier[deleteCertificateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[certificateOrderName] , identifier[String] identifier[name] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[Void] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[deleteCertificateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[certificateOrderName] , identifier[name] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
@Benchmark @OperationsPerInvocation(20) public void benchmarkByteBuddyWithPrefix(Blackhole blackHole) { blackHole.consume(byteBuddyWithPrefixInstance.method(booleanValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(byteValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(shortValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(intValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(charValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(intValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(longValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(floatValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(doubleValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(stringValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(booleanValue, booleanValue, booleanValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(byteValue, byteValue, byteValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(shortValue, shortValue, shortValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(intValue, intValue, intValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(charValue, charValue, charValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(intValue, intValue, intValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(longValue, longValue, longValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(floatValue, floatValue, floatValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(doubleValue, doubleValue, doubleValue)); blackHole.consume(byteBuddyWithPrefixInstance.method(stringValue, stringValue, stringValue)); }
class class_name[name] begin[{] method[benchmarkByteBuddyWithPrefix, return_type[void], modifier[public], parameter[blackHole]] begin[{] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.booleanValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.byteValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.shortValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.intValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.charValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.intValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.longValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.floatValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.doubleValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.stringValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.booleanValue], member[.booleanValue], member[.booleanValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.byteValue], member[.byteValue], member[.byteValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.shortValue], member[.shortValue], member[.shortValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.intValue], member[.intValue], member[.intValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.charValue], member[.charValue], member[.charValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.intValue], member[.intValue], member[.intValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.longValue], member[.longValue], member[.longValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.floatValue], member[.floatValue], member[.floatValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.doubleValue], member[.doubleValue], member[.doubleValue]]]]] call[blackHole.consume, parameter[call[byteBuddyWithPrefixInstance.method, parameter[member[.stringValue], member[.stringValue], member[.stringValue]]]]] end[}] END[}]
annotation[@] identifier[Benchmark] annotation[@] identifier[OperationsPerInvocation] operator[SEP] Other[20] operator[SEP] Keyword[public] Keyword[void] identifier[benchmarkByteBuddyWithPrefix] operator[SEP] identifier[Blackhole] identifier[blackHole] operator[SEP] { identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[byteValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[shortValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[charValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[floatValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[stringValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[booleanValue] , identifier[booleanValue] , identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[byteValue] , identifier[byteValue] , identifier[byteValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[shortValue] , identifier[shortValue] , identifier[shortValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[intValue] , identifier[intValue] , identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[charValue] , identifier[charValue] , identifier[charValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[intValue] , identifier[intValue] , identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[longValue] , identifier[longValue] , identifier[longValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[floatValue] , identifier[floatValue] , identifier[floatValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[doubleValue] , identifier[doubleValue] , identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyWithPrefixInstance] operator[SEP] identifier[method] operator[SEP] identifier[stringValue] , identifier[stringValue] , identifier[stringValue] operator[SEP] operator[SEP] operator[SEP] }
public void putIfNoneMatch(URI uri, String eTag, String mimetype, String content, Header[] additionalRequestHeaders, Credentials credentials) { ra.getExecutorService().execute( new AsyncPutIfNoneMatchStringContentHandler(ra, handle, uri, eTag, mimetype, content, additionalRequestHeaders, credentials)); }
class class_name[name] begin[{] method[putIfNoneMatch, return_type[void], modifier[public], parameter[uri, eTag, mimetype, content, additionalRequestHeaders, credentials]] begin[{] call[ra.getExecutorService, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[putIfNoneMatch] operator[SEP] identifier[URI] identifier[uri] , identifier[String] identifier[eTag] , identifier[String] identifier[mimetype] , identifier[String] identifier[content] , identifier[Header] operator[SEP] operator[SEP] identifier[additionalRequestHeaders] , identifier[Credentials] identifier[credentials] operator[SEP] { identifier[ra] operator[SEP] identifier[getExecutorService] operator[SEP] operator[SEP] operator[SEP] identifier[execute] operator[SEP] Keyword[new] identifier[AsyncPutIfNoneMatchStringContentHandler] operator[SEP] identifier[ra] , identifier[handle] , identifier[uri] , identifier[eTag] , identifier[mimetype] , identifier[content] , identifier[additionalRequestHeaders] , identifier[credentials] operator[SEP] operator[SEP] operator[SEP] }
@GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration public static boolean tryAcquireUninterruptibly( Semaphore semaphore, long timeout, TimeUnit unit) { return tryAcquireUninterruptibly(semaphore, 1, timeout, unit); }
class class_name[name] begin[{] method[tryAcquireUninterruptibly, return_type[type[boolean]], modifier[public static], parameter[semaphore, timeout, unit]] begin[{] return[call[.tryAcquireUninterruptibly, parameter[member[.semaphore], literal[1], member[.timeout], member[.unit]]]] end[}] END[}]
annotation[@] identifier[GwtIncompatible] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[boolean] identifier[tryAcquireUninterruptibly] operator[SEP] identifier[Semaphore] identifier[semaphore] , Keyword[long] identifier[timeout] , identifier[TimeUnit] identifier[unit] operator[SEP] { Keyword[return] identifier[tryAcquireUninterruptibly] operator[SEP] identifier[semaphore] , Other[1] , identifier[timeout] , identifier[unit] operator[SEP] operator[SEP] }
private static int polymod(final byte[] values) { int c = 1; for (byte v_i: values) { int c0 = (c >>> 25) & 0xff; c = ((c & 0x1ffffff) << 5) ^ (v_i & 0xff); if ((c0 & 1) != 0) c ^= 0x3b6a57b2; if ((c0 & 2) != 0) c ^= 0x26508e6d; if ((c0 & 4) != 0) c ^= 0x1ea119fa; if ((c0 & 8) != 0) c ^= 0x3d4233dd; if ((c0 & 16) != 0) c ^= 0x2a1462b3; } return c; }
class class_name[name] begin[{] method[polymod, return_type[type[int]], modifier[private static], parameter[values]] begin[{] local_variable[type[int], c] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=25), operator=>>>), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), name=c0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x1ffffff), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), operator=<<), operandr=BinaryOperation(operandl=MemberReference(member=v_i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), operator=^)), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=^=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x3b6a57b2)), label=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=^=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x26508e6d)), label=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=^=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x1ea119fa)), label=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=^=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x3d4233dd)), label=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=^=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x2a1462b3)), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=v_i)], modifiers=set(), type=BasicType(dimensions=[], name=byte))), label=None) return[member[.c]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[int] identifier[polymod] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[values] operator[SEP] { Keyword[int] identifier[c] operator[=] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[byte] identifier[v_i] operator[:] identifier[values] operator[SEP] { Keyword[int] identifier[c0] operator[=] operator[SEP] identifier[c] operator[>] operator[>] operator[>] Other[25] operator[SEP] operator[&] literal[Integer] operator[SEP] identifier[c] operator[=] operator[SEP] operator[SEP] identifier[c] operator[&] literal[Integer] operator[SEP] operator[<<] Other[5] operator[SEP] operator[^] operator[SEP] identifier[v_i] operator[&] literal[Integer] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[c0] operator[&] Other[1] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[c] operator[^=] literal[Integer] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[c0] operator[&] Other[2] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[c] operator[^=] literal[Integer] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[c0] operator[&] Other[4] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[c] operator[^=] literal[Integer] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[c0] operator[&] Other[8] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[c] operator[^=] literal[Integer] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[c0] operator[&] Other[16] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[c] operator[^=] literal[Integer] operator[SEP] } Keyword[return] identifier[c] operator[SEP] }
static BindTransform getMathTransform(TypeName typeName) { if (BigDecimal.class.getName().equals(typeName.toString())) { return new BigDecimalBindTransform(); } else if (BigInteger.class.getName().equals(typeName.toString())) { return new BigIntegerBindTransform(); } return null; }
class class_name[name] begin[{] method[getMathTransform, return_type[type[BindTransform]], modifier[static], parameter[typeName]] begin[{] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=typeName, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=BigDecimal, sub_type=None))] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigDecimalBindTransform, sub_type=None))] else begin[{] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=typeName, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=BigInteger, sub_type=None))] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigIntegerBindTransform, sub_type=None))] else begin[{] None end[}] end[}] return[literal[null]] end[}] END[}]
Keyword[static] identifier[BindTransform] identifier[getMathTransform] operator[SEP] identifier[TypeName] identifier[typeName] operator[SEP] { Keyword[if] operator[SEP] identifier[BigDecimal] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[typeName] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[BigDecimalBindTransform] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[BigInteger] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[typeName] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[BigIntegerBindTransform] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public final EObject entryRulePrefixExpression() throws RecognitionException { EObject current = null; EObject iv_rulePrefixExpression = null; try { // InternalSimpleExpressions.g:350:2: (iv_rulePrefixExpression= rulePrefixExpression EOF ) // InternalSimpleExpressions.g:351:2: iv_rulePrefixExpression= rulePrefixExpression EOF { newCompositeNode(grammarAccess.getPrefixExpressionRule()); pushFollow(FOLLOW_1); iv_rulePrefixExpression=rulePrefixExpression(); state._fsp--; current =iv_rulePrefixExpression; match(input,EOF,FOLLOW_2); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[entryRulePrefixExpression, return_type[type[EObject]], modifier[final public], parameter[]] begin[{] local_variable[type[EObject], current] local_variable[type[EObject], iv_rulePrefixExpression] TryStatement(block=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getPrefixExpressionRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_1, 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=iv_rulePrefixExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=rulePrefixExpression, 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), StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=iv_rulePrefixExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, 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[entryRulePrefixExpression] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[iv_rulePrefixExpression] operator[=] Other[null] operator[SEP] Keyword[try] { { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getPrefixExpressionRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pushFollow] operator[SEP] identifier[FOLLOW_1] operator[SEP] operator[SEP] identifier[iv_rulePrefixExpression] operator[=] identifier[rulePrefixExpression] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] identifier[current] operator[=] identifier[iv_rulePrefixExpression] operator[SEP] identifier[match] operator[SEP] identifier[input] , identifier[EOF] , identifier[FOLLOW_2] 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] }
public void marshall(StartSessionRequest startSessionRequest, ProtocolMarshaller protocolMarshaller) { if (startSessionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(startSessionRequest.getTarget(), TARGET_BINDING); protocolMarshaller.marshall(startSessionRequest.getDocumentName(), DOCUMENTNAME_BINDING); protocolMarshaller.marshall(startSessionRequest.getParameters(), PARAMETERS_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[startSessionRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.startSessionRequest], ==, 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=getTarget, postfix_operators=[], prefix_operators=[], qualifier=startSessionRequest, selectors=[], type_arguments=None), MemberReference(member=TARGET_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=getDocumentName, postfix_operators=[], prefix_operators=[], qualifier=startSessionRequest, selectors=[], type_arguments=None), MemberReference(member=DOCUMENTNAME_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=getParameters, postfix_operators=[], prefix_operators=[], qualifier=startSessionRequest, selectors=[], type_arguments=None), MemberReference(member=PARAMETERS_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[StartSessionRequest] identifier[startSessionRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[startSessionRequest] 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[startSessionRequest] operator[SEP] identifier[getTarget] operator[SEP] operator[SEP] , identifier[TARGET_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[startSessionRequest] operator[SEP] identifier[getDocumentName] operator[SEP] operator[SEP] , identifier[DOCUMENTNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[startSessionRequest] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] , identifier[PARAMETERS_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public <R> EtcdResponsePromise<R> send(final EtcdRequest<R> etcdRequest) throws IOException { ConnectionState connectionState = new ConnectionState(uris, lastWorkingUriIndex); if (etcdRequest.getPromise() == null) { etcdRequest.setPromise(new EtcdResponsePromise<R>( etcdRequest.getRetryPolicy(), connectionState, new RetryHandler() { @Override public void doRetry(ConnectionState connectionState) throws IOException { connect(etcdRequest, connectionState); } })); } connect(etcdRequest, connectionState); return etcdRequest.getPromise(); }
class class_name[name] begin[{] method[send, return_type[type[EtcdResponsePromise]], modifier[public], parameter[etcdRequest]] begin[{] local_variable[type[ConnectionState], connectionState] if[binary_operation[call[etcdRequest.getPromise, parameter[]], ==, literal[null]]] begin[{] call[etcdRequest.setPromise, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getRetryPolicy, postfix_operators=[], prefix_operators=[], qualifier=etcdRequest, selectors=[], type_arguments=None), MemberReference(member=connectionState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=etcdRequest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=connectionState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=connect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=doRetry, parameters=[FormalParameter(annotations=[], modifiers=set(), name=connectionState, type=ReferenceType(arguments=None, dimensions=[], name=ConnectionState, sub_type=None), varargs=False)], return_type=None, throws=['IOException'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RetryHandler, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=R, sub_type=None))], dimensions=None, name=EtcdResponsePromise, sub_type=None))]] else begin[{] None end[}] call[.connect, parameter[member[.etcdRequest], member[.connectionState]]] return[call[etcdRequest.getPromise, parameter[]]] end[}] END[}]
Keyword[public] operator[<] identifier[R] operator[>] identifier[EtcdResponsePromise] operator[<] identifier[R] operator[>] identifier[send] operator[SEP] Keyword[final] identifier[EtcdRequest] operator[<] identifier[R] operator[>] identifier[etcdRequest] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ConnectionState] identifier[connectionState] operator[=] Keyword[new] identifier[ConnectionState] operator[SEP] identifier[uris] , identifier[lastWorkingUriIndex] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[etcdRequest] operator[SEP] identifier[getPromise] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[etcdRequest] operator[SEP] identifier[setPromise] operator[SEP] Keyword[new] identifier[EtcdResponsePromise] operator[<] identifier[R] operator[>] operator[SEP] identifier[etcdRequest] operator[SEP] identifier[getRetryPolicy] operator[SEP] operator[SEP] , identifier[connectionState] , Keyword[new] identifier[RetryHandler] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[doRetry] operator[SEP] identifier[ConnectionState] identifier[connectionState] operator[SEP] Keyword[throws] identifier[IOException] { identifier[connect] operator[SEP] identifier[etcdRequest] , identifier[connectionState] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] operator[SEP] } identifier[connect] operator[SEP] identifier[etcdRequest] , identifier[connectionState] operator[SEP] operator[SEP] Keyword[return] identifier[etcdRequest] operator[SEP] identifier[getPromise] operator[SEP] operator[SEP] operator[SEP] }
public static PushNotificationPayload fromJSON(String rawJSON) throws JSONException { PushNotificationPayload payload = new PushNotificationPayload(rawJSON); return payload; }
class class_name[name] begin[{] method[fromJSON, return_type[type[PushNotificationPayload]], modifier[public static], parameter[rawJSON]] begin[{] local_variable[type[PushNotificationPayload], payload] return[member[.payload]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PushNotificationPayload] identifier[fromJSON] operator[SEP] identifier[String] identifier[rawJSON] operator[SEP] Keyword[throws] identifier[JSONException] { identifier[PushNotificationPayload] identifier[payload] operator[=] Keyword[new] identifier[PushNotificationPayload] operator[SEP] identifier[rawJSON] operator[SEP] operator[SEP] Keyword[return] identifier[payload] operator[SEP] }
public List<String> selectProjectPermissionsOfUser(DbSession dbSession, int userId, long projectId) { return mapper(dbSession).selectProjectPermissionsOfUser(userId, projectId); }
class class_name[name] begin[{] method[selectProjectPermissionsOfUser, return_type[type[List]], modifier[public], parameter[dbSession, userId, projectId]] begin[{] return[call[.mapper, parameter[member[.dbSession]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[selectProjectPermissionsOfUser] operator[SEP] identifier[DbSession] identifier[dbSession] , Keyword[int] identifier[userId] , Keyword[long] identifier[projectId] operator[SEP] { Keyword[return] identifier[mapper] operator[SEP] identifier[dbSession] operator[SEP] operator[SEP] identifier[selectProjectPermissionsOfUser] operator[SEP] identifier[userId] , identifier[projectId] operator[SEP] operator[SEP] }
protected final int readBytesAt(int offset) throws IOException { // shouldn't modify mBytePtr, assumed to be 'offset' if (_inputSource != null) { int count = _inputSource.read(_inputBuffer, offset, _inputBuffer.length - offset); if (count > 0) { _inputEnd += count; } return count; } return -1; }
class class_name[name] begin[{] method[readBytesAt, return_type[type[int]], modifier[final protected], parameter[offset]] begin[{] if[binary_operation[member[._inputSource], !=, literal[null]]] begin[{] local_variable[type[int], count] if[binary_operation[member[.count], >, literal[0]]] begin[{] assign[member[._inputEnd], member[.count]] else begin[{] None end[}] return[member[.count]] else begin[{] None end[}] return[literal[1]] end[}] END[}]
Keyword[protected] Keyword[final] Keyword[int] identifier[readBytesAt] operator[SEP] Keyword[int] identifier[offset] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[_inputSource] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[count] operator[=] identifier[_inputSource] operator[SEP] identifier[read] operator[SEP] identifier[_inputBuffer] , identifier[offset] , identifier[_inputBuffer] operator[SEP] identifier[length] operator[-] identifier[offset] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[count] operator[>] Other[0] operator[SEP] { identifier[_inputEnd] operator[+=] identifier[count] operator[SEP] } Keyword[return] identifier[count] operator[SEP] } Keyword[return] operator[-] Other[1] operator[SEP] }
public static String sanitize(final String input) { if(input == null) { return null; } final StringBuilder sb = new StringBuilder(); for (int i = 0; i < input.length(); i++) { final char c = input.charAt(i); if (c == '*') { // escape asterisk sb.append("\\2a"); } else if (c == '(') { // escape left parenthesis sb.append("\\28"); } else if (c == ')') { // escape right parenthesis sb.append("\\29"); } else if (c == '\\') { // escape backslash sb.append("\\5c"); } else if (c == '\u0000') { // escape NULL char sb.append("\\00"); } else if (c <= 0x7f) { // regular 1-byte UTF-8 char sb.append(String.valueOf(c)); } else if (c >= 0x080) { // higher-order 2, 3 and 4-byte UTF-8 chars final byte[] utf8bytes = String.valueOf(c).getBytes(StandardCharsets.UTF_8); for (final byte b : utf8bytes) { sb.append(String.format("\\%02x", b)); } } } return sb.toString(); }
class class_name[name] begin[{] method[sanitize, return_type[type[String]], modifier[public static], parameter[input]] begin[{] if[binary_operation[member[.input], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[StringBuilder], sb] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=c)], modifiers={'final'}, type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='*'), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='('), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=')'), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\\'), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x7f), operator=<=), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x080), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[MethodInvocation(arguments=[MemberReference(member=UTF_8, postfix_operators=[], prefix_operators=[], qualifier=StandardCharsets, selectors=[])], member=getBytes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=utf8bytes)], modifiers={'final'}, type=BasicType(dimensions=[None], name=byte)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\%02x"), MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=utf8bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=b)], modifiers={'final'}, type=BasicType(dimensions=[], name=byte))), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\00")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\5c")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\29")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\28")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\2a")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[sanitize] operator[SEP] Keyword[final] identifier[String] identifier[input] operator[SEP] { Keyword[if] operator[SEP] identifier[input] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[final] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[input] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[char] identifier[c] operator[=] identifier[input] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[<=] literal[Integer] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[c] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[>=] literal[Integer] operator[SEP] { Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[utf8bytes] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[getBytes] operator[SEP] identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] Keyword[byte] identifier[b] operator[:] identifier[utf8bytes] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[b] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(GetLoadBalancersRequest getLoadBalancersRequest, ProtocolMarshaller protocolMarshaller) { if (getLoadBalancersRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getLoadBalancersRequest.getPageToken(), PAGETOKEN_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[getLoadBalancersRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.getLoadBalancersRequest], ==, 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=getPageToken, postfix_operators=[], prefix_operators=[], qualifier=getLoadBalancersRequest, selectors=[], type_arguments=None), MemberReference(member=PAGETOKEN_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[GetLoadBalancersRequest] identifier[getLoadBalancersRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[getLoadBalancersRequest] 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[getLoadBalancersRequest] operator[SEP] identifier[getPageToken] operator[SEP] operator[SEP] , identifier[PAGETOKEN_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public void insert(final Widget page, final Widget tab, final int beforeIndex) { final String text = (tab instanceof HasText) ? ((HasText) tab).getText() : "Tab #" + beforeIndex; if (beforeIndex < PAGE_LIMIT - 1) { // visible pages Tab t = tabs.add(text, beforeIndex); super.insert(page, t, beforeIndex); } else if (beforeIndex == PAGE_LIMIT - 1) { // last visible page Tab t = tabs.add(text, beforeIndex); offPageContainer.add(new OffPageText(0, text), page); super.insert(offPageContainer.asWidget(), t, beforeIndex); } else { // off page - don't use beforeIndex as it'll always be PAGE_LIMIT int last = offPageContainer.size(); offPageContainer.add(new OffPageText(last, text), page); tabs.showSelector(); } }
class class_name[name] begin[{] method[insert, return_type[void], modifier[public], parameter[page, tab, beforeIndex]] begin[{] local_variable[type[String], text] if[binary_operation[member[.beforeIndex], <, binary_operation[member[.PAGE_LIMIT], -, literal[1]]]] begin[{] local_variable[type[Tab], t] SuperMethodInvocation(arguments=[MemberReference(member=page, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=beforeIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=insert, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) else begin[{] if[binary_operation[member[.beforeIndex], ==, binary_operation[member[.PAGE_LIMIT], -, literal[1]]]] begin[{] local_variable[type[Tab], t] call[offPageContainer.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OffPageText, sub_type=None)), member[.page]]] SuperMethodInvocation(arguments=[MethodInvocation(arguments=[], member=asWidget, postfix_operators=[], prefix_operators=[], qualifier=offPageContainer, selectors=[], type_arguments=None), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=beforeIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=insert, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) else begin[{] local_variable[type[int], last] call[offPageContainer.add, parameter[ClassCreator(arguments=[MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OffPageText, sub_type=None)), member[.page]]] call[tabs.showSelector, parameter[]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[insert] operator[SEP] Keyword[final] identifier[Widget] identifier[page] , Keyword[final] identifier[Widget] identifier[tab] , Keyword[final] Keyword[int] identifier[beforeIndex] operator[SEP] { Keyword[final] identifier[String] identifier[text] operator[=] operator[SEP] identifier[tab] Keyword[instanceof] identifier[HasText] operator[SEP] operator[?] operator[SEP] operator[SEP] identifier[HasText] operator[SEP] identifier[tab] operator[SEP] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[:] literal[String] operator[+] identifier[beforeIndex] operator[SEP] Keyword[if] operator[SEP] identifier[beforeIndex] operator[<] identifier[PAGE_LIMIT] operator[-] Other[1] operator[SEP] { identifier[Tab] identifier[t] operator[=] identifier[tabs] operator[SEP] identifier[add] operator[SEP] identifier[text] , identifier[beforeIndex] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[insert] operator[SEP] identifier[page] , identifier[t] , identifier[beforeIndex] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[beforeIndex] operator[==] identifier[PAGE_LIMIT] operator[-] Other[1] operator[SEP] { identifier[Tab] identifier[t] operator[=] identifier[tabs] operator[SEP] identifier[add] operator[SEP] identifier[text] , identifier[beforeIndex] operator[SEP] operator[SEP] identifier[offPageContainer] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[OffPageText] operator[SEP] Other[0] , identifier[text] operator[SEP] , identifier[page] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[insert] operator[SEP] identifier[offPageContainer] operator[SEP] identifier[asWidget] operator[SEP] operator[SEP] , identifier[t] , identifier[beforeIndex] operator[SEP] operator[SEP] } Keyword[else] { Keyword[int] identifier[last] operator[=] identifier[offPageContainer] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[offPageContainer] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[OffPageText] operator[SEP] identifier[last] , identifier[text] operator[SEP] , identifier[page] operator[SEP] operator[SEP] identifier[tabs] operator[SEP] identifier[showSelector] operator[SEP] operator[SEP] operator[SEP] } }
public URL findResource(URL source, String name) { return findResource(source, name, new HashSet<>(), null); }
class class_name[name] begin[{] method[findResource, return_type[type[URL]], modifier[public], parameter[source, name]] begin[{] return[call[.findResource, parameter[member[.source], member[.name], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=HashSet, sub_type=None)), literal[null]]]] end[}] END[}]
Keyword[public] identifier[URL] identifier[findResource] operator[SEP] identifier[URL] identifier[source] , identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[findResource] operator[SEP] identifier[source] , identifier[name] , Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] }
public List<Issue> getClosesIssues(Object projectIdOrPath, Integer mergeRequestIid) throws GitLabApiException { return (getClosesIssues(projectIdOrPath, mergeRequestIid, getDefaultPerPage()).all()); }
class class_name[name] begin[{] method[getClosesIssues, return_type[type[List]], modifier[public], parameter[projectIdOrPath, mergeRequestIid]] begin[{] return[call[.getClosesIssues, parameter[member[.projectIdOrPath], member[.mergeRequestIid], call[.getDefaultPerPage, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Issue] operator[>] identifier[getClosesIssues] operator[SEP] identifier[Object] identifier[projectIdOrPath] , identifier[Integer] identifier[mergeRequestIid] operator[SEP] Keyword[throws] identifier[GitLabApiException] { Keyword[return] operator[SEP] identifier[getClosesIssues] operator[SEP] identifier[projectIdOrPath] , identifier[mergeRequestIid] , identifier[getDefaultPerPage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[all] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private static <K,V> boolean isBlack(final Node<K,V> node, final int index) { return ((node == null) ? true : node.isBlack(index)); }
class class_name[name] begin[{] method[isBlack, return_type[type[boolean]], modifier[private static], parameter[node, index]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isBlack, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true))] end[}] END[}]
Keyword[private] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] Keyword[boolean] identifier[isBlack] operator[SEP] Keyword[final] identifier[Node] operator[<] identifier[K] , identifier[V] operator[>] identifier[node] , Keyword[final] Keyword[int] identifier[index] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[node] operator[==] Other[null] operator[SEP] operator[?] literal[boolean] operator[:] identifier[node] operator[SEP] identifier[isBlack] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] }
public void build(final Object id, final Map<String, Object> attributes) { setId(ProfileHelper.sanitizeIdentifier(this, id)); addAttributes(attributes); }
class class_name[name] begin[{] method[build, return_type[void], modifier[public], parameter[id, attributes]] begin[{] call[.setId, parameter[call[ProfileHelper.sanitizeIdentifier, parameter[THIS[], member[.id]]]]] call[.addAttributes, parameter[member[.attributes]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[build] operator[SEP] Keyword[final] identifier[Object] identifier[id] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[attributes] operator[SEP] { identifier[setId] operator[SEP] identifier[ProfileHelper] operator[SEP] identifier[sanitizeIdentifier] operator[SEP] Keyword[this] , identifier[id] operator[SEP] operator[SEP] operator[SEP] identifier[addAttributes] operator[SEP] identifier[attributes] operator[SEP] operator[SEP] }
public static MultiLayerNetwork restoreMultiLayerNetwork(@NonNull String path, boolean loadUpdater) throws IOException { return restoreMultiLayerNetwork(new File(path), loadUpdater); }
class class_name[name] begin[{] method[restoreMultiLayerNetwork, return_type[type[MultiLayerNetwork]], modifier[public static], parameter[path, loadUpdater]] begin[{] return[call[.restoreMultiLayerNetwork, parameter[ClassCreator(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), member[.loadUpdater]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[MultiLayerNetwork] identifier[restoreMultiLayerNetwork] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[path] , Keyword[boolean] identifier[loadUpdater] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[restoreMultiLayerNetwork] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[path] operator[SEP] , identifier[loadUpdater] operator[SEP] operator[SEP] }
public void reset() { if (mNsCount > 0) { mNamespaceBuilder.reset(); mDefaultNsDeclared = false; mNsCount = 0; } /* No need to clear attr name, or NS prefix Strings; they are * canonicalized and will be referenced by symbol table in any * case... so we can save trouble of cleaning them up. This Object * will get GC'ed soon enough, after parser itself gets disposed of. */ if (mAttrCount > 0) { mValueBuilder.reset(); mAttrCount = 0; if (mXmlIdAttrIndex >= 0) { mXmlIdAttrIndex = XMLID_IX_NONE; } } /* Note: attribute values will be cleared later on, when validating * namespaces. This so that we know how much to clean up; and * occasionally can also just avoid clean up (when resizing) */ }
class class_name[name] begin[{] method[reset, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[member[.mNsCount], >, literal[0]]] begin[{] call[mNamespaceBuilder.reset, parameter[]] assign[member[.mDefaultNsDeclared], literal[false]] assign[member[.mNsCount], literal[0]] else begin[{] None end[}] if[binary_operation[member[.mAttrCount], >, literal[0]]] begin[{] call[mValueBuilder.reset, parameter[]] assign[member[.mAttrCount], literal[0]] if[binary_operation[member[.mXmlIdAttrIndex], >=, literal[0]]] begin[{] assign[member[.mXmlIdAttrIndex], member[.XMLID_IX_NONE]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[reset] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[mNsCount] operator[>] Other[0] operator[SEP] { identifier[mNamespaceBuilder] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[mDefaultNsDeclared] operator[=] literal[boolean] operator[SEP] identifier[mNsCount] operator[=] Other[0] operator[SEP] } Keyword[if] operator[SEP] identifier[mAttrCount] operator[>] Other[0] operator[SEP] { identifier[mValueBuilder] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[mAttrCount] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[mXmlIdAttrIndex] operator[>=] Other[0] operator[SEP] { identifier[mXmlIdAttrIndex] operator[=] identifier[XMLID_IX_NONE] operator[SEP] } } }
public static List<DesignDocument> fromDirectory(File directory) throws FileNotFoundException { List<DesignDocument> designDocuments = new ArrayList<DesignDocument>(); if (directory.isDirectory()) { Collection<File> files = FileUtils.listFiles(directory, null, true); for (File designDocFile : files) { designDocuments.add(fromFile(designDocFile)); } } else { designDocuments.add(fromFile(directory)); } return designDocuments; }
class class_name[name] begin[{] method[fromDirectory, return_type[type[List]], modifier[public static], parameter[directory]] begin[{] local_variable[type[List], designDocuments] if[call[directory.isDirectory, parameter[]]] begin[{] local_variable[type[Collection], files] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=designDocFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fromFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=designDocuments, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=designDocFile)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) else begin[{] call[designDocuments.add, parameter[call[.fromFile, parameter[member[.directory]]]]] end[}] return[member[.designDocuments]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[DesignDocument] operator[>] identifier[fromDirectory] operator[SEP] identifier[File] identifier[directory] operator[SEP] Keyword[throws] identifier[FileNotFoundException] { identifier[List] operator[<] identifier[DesignDocument] operator[>] identifier[designDocuments] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[DesignDocument] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[directory] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[Collection] operator[<] identifier[File] operator[>] identifier[files] operator[=] identifier[FileUtils] operator[SEP] identifier[listFiles] operator[SEP] identifier[directory] , Other[null] , literal[boolean] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[File] identifier[designDocFile] operator[:] identifier[files] operator[SEP] { identifier[designDocuments] operator[SEP] identifier[add] operator[SEP] identifier[fromFile] operator[SEP] identifier[designDocFile] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[designDocuments] operator[SEP] identifier[add] operator[SEP] identifier[fromFile] operator[SEP] identifier[directory] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[designDocuments] operator[SEP] }
public void persistInSession( HttpServletRequest request, HttpServletResponse response ) { StorageHandler sh = Handlers.get( getServletContext() ).getStorageHandler(); HttpServletRequest unwrappedRequest = PageFlowUtils.unwrapMultipart( request ); RequestContext rc = new RequestContext( unwrappedRequest, null ); String attrName = ScopedServletUtils.getScopedSessionAttrName( InternalConstants.FACES_BACKING_ATTR, unwrappedRequest ); sh.setAttribute( rc, attrName, this ); }
class class_name[name] begin[{] method[persistInSession, return_type[void], modifier[public], parameter[request, response]] begin[{] local_variable[type[StorageHandler], sh] local_variable[type[HttpServletRequest], unwrappedRequest] local_variable[type[RequestContext], rc] local_variable[type[String], attrName] call[sh.setAttribute, parameter[member[.rc], member[.attrName], THIS[]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[persistInSession] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] operator[SEP] { identifier[StorageHandler] identifier[sh] operator[=] identifier[Handlers] operator[SEP] identifier[get] operator[SEP] identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getStorageHandler] operator[SEP] operator[SEP] operator[SEP] identifier[HttpServletRequest] identifier[unwrappedRequest] operator[=] identifier[PageFlowUtils] operator[SEP] identifier[unwrapMultipart] operator[SEP] identifier[request] operator[SEP] operator[SEP] identifier[RequestContext] identifier[rc] operator[=] Keyword[new] identifier[RequestContext] operator[SEP] identifier[unwrappedRequest] , Other[null] operator[SEP] operator[SEP] identifier[String] identifier[attrName] operator[=] identifier[ScopedServletUtils] operator[SEP] identifier[getScopedSessionAttrName] operator[SEP] identifier[InternalConstants] operator[SEP] identifier[FACES_BACKING_ATTR] , identifier[unwrappedRequest] operator[SEP] operator[SEP] identifier[sh] operator[SEP] identifier[setAttribute] operator[SEP] identifier[rc] , identifier[attrName] , Keyword[this] operator[SEP] operator[SEP] }
public double distance(Vector o) { return Math.sqrt(NumberConversions.square(x - o.x) + NumberConversions.square(y - o.y) + NumberConversions.square(z - o.z)); }
class class_name[name] begin[{] method[distance, return_type[type[double]], modifier[public], parameter[o]] begin[{] return[call[Math.sqrt, parameter[binary_operation[binary_operation[call[NumberConversions.square, parameter[binary_operation[member[.x], -, member[o.x]]]], +, call[NumberConversions.square, parameter[binary_operation[member[.y], -, member[o.y]]]]], +, call[NumberConversions.square, parameter[binary_operation[member[.z], -, member[o.z]]]]]]]] end[}] END[}]
Keyword[public] Keyword[double] identifier[distance] operator[SEP] identifier[Vector] identifier[o] operator[SEP] { Keyword[return] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[NumberConversions] operator[SEP] identifier[square] operator[SEP] identifier[x] operator[-] identifier[o] operator[SEP] identifier[x] operator[SEP] operator[+] identifier[NumberConversions] operator[SEP] identifier[square] operator[SEP] identifier[y] operator[-] identifier[o] operator[SEP] identifier[y] operator[SEP] operator[+] identifier[NumberConversions] operator[SEP] identifier[square] operator[SEP] identifier[z] operator[-] identifier[o] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] }
@Override public ListBuildsForProjectResult listBuildsForProject(ListBuildsForProjectRequest request) { request = beforeClientExecution(request); return executeListBuildsForProject(request); }
class class_name[name] begin[{] method[listBuildsForProject, return_type[type[ListBuildsForProjectResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeListBuildsForProject, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ListBuildsForProjectResult] identifier[listBuildsForProject] operator[SEP] identifier[ListBuildsForProjectRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeListBuildsForProject] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
private JScrollPane getJScrollPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setViewportView(getMainPanel()); jScrollPane.setName("ScanProgressScrollPane"); jScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); } return jScrollPane; }
class class_name[name] begin[{] method[getJScrollPane, return_type[type[JScrollPane]], modifier[private], parameter[]] begin[{] if[binary_operation[member[.jScrollPane], ==, literal[null]]] begin[{] assign[member[.jScrollPane], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JScrollPane, sub_type=None))] call[jScrollPane.setViewportView, parameter[call[.getMainPanel, parameter[]]]] call[jScrollPane.setName, parameter[literal["ScanProgressScrollPane"]]] call[jScrollPane.setHorizontalScrollBarPolicy, parameter[member[JScrollPane.HORIZONTAL_SCROLLBAR_NEVER]]] call[jScrollPane.setVerticalScrollBarPolicy, parameter[member[JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED]]] else begin[{] None end[}] return[member[.jScrollPane]] end[}] END[}]
Keyword[private] identifier[JScrollPane] identifier[getJScrollPane] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[jScrollPane] operator[==] Other[null] operator[SEP] { identifier[jScrollPane] operator[=] Keyword[new] identifier[JScrollPane] operator[SEP] operator[SEP] operator[SEP] identifier[jScrollPane] operator[SEP] identifier[setViewportView] operator[SEP] identifier[getMainPanel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jScrollPane] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jScrollPane] operator[SEP] identifier[setHorizontalScrollBarPolicy] operator[SEP] identifier[JScrollPane] operator[SEP] identifier[HORIZONTAL_SCROLLBAR_NEVER] operator[SEP] operator[SEP] identifier[jScrollPane] operator[SEP] identifier[setVerticalScrollBarPolicy] operator[SEP] identifier[JScrollPane] operator[SEP] identifier[VERTICAL_SCROLLBAR_AS_NEEDED] operator[SEP] operator[SEP] } Keyword[return] identifier[jScrollPane] operator[SEP] }
@Override public String getPath() { ServletRESTRequestImpl ret = castRequest(); if (ret != null) return ret.getPath(); return null; }
class class_name[name] begin[{] method[getPath, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[ServletRESTRequestImpl], ret] if[binary_operation[member[.ret], !=, literal[null]]] begin[{] return[call[ret.getPath, parameter[]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getPath] operator[SEP] operator[SEP] { identifier[ServletRESTRequestImpl] identifier[ret] operator[=] identifier[castRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ret] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[ret] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
public ServiceFuture<ApplicationGatewayInner> getByResourceGroupAsync(String resourceGroupName, String applicationGatewayName, final ServiceCallback<ApplicationGatewayInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); }
class class_name[name] begin[{] method[getByResourceGroupAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, applicationGatewayName, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.getByResourceGroupWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.applicationGatewayName]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[ApplicationGatewayInner] operator[>] identifier[getByResourceGroupAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[applicationGatewayName] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[ApplicationGatewayInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[getByResourceGroupWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[applicationGatewayName] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public static Hashtable<String,Vector<Object>> errorAsHastable(String msgId) { Hashtable<String,Vector<Object>> table = new Hashtable<String,Vector<Object>>(); table.put(GreenPepperServerErrorKey.ERROR, errorAsVector(msgId)); return table; }
class class_name[name] begin[{] method[errorAsHastable, return_type[type[Hashtable]], modifier[public static], parameter[msgId]] begin[{] local_variable[type[Hashtable], table] call[table.put, parameter[member[GreenPepperServerErrorKey.ERROR], call[.errorAsVector, parameter[member[.msgId]]]]] return[member[.table]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Hashtable] operator[<] identifier[String] , identifier[Vector] operator[<] identifier[Object] operator[>] operator[>] identifier[errorAsHastable] operator[SEP] identifier[String] identifier[msgId] operator[SEP] { identifier[Hashtable] operator[<] identifier[String] , identifier[Vector] operator[<] identifier[Object] operator[>] operator[>] identifier[table] operator[=] Keyword[new] identifier[Hashtable] operator[<] identifier[String] , identifier[Vector] operator[<] identifier[Object] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[table] operator[SEP] identifier[put] operator[SEP] identifier[GreenPepperServerErrorKey] operator[SEP] identifier[ERROR] , identifier[errorAsVector] operator[SEP] identifier[msgId] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[table] operator[SEP] }
public final AntlrDatatypeRuleToken ruleQualifiedName() throws RecognitionException { AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); Token kw=null; AntlrDatatypeRuleToken this_ValidID_0 = null; AntlrDatatypeRuleToken this_ValidID_2 = null; enterRule(); try { // InternalXtype.g:775:2: ( (this_ValidID_0= ruleValidID (kw= '.' this_ValidID_2= ruleValidID )* ) ) // InternalXtype.g:776:2: (this_ValidID_0= ruleValidID (kw= '.' this_ValidID_2= ruleValidID )* ) { // InternalXtype.g:776:2: (this_ValidID_0= ruleValidID (kw= '.' this_ValidID_2= ruleValidID )* ) // InternalXtype.g:777:3: this_ValidID_0= ruleValidID (kw= '.' this_ValidID_2= ruleValidID )* { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getQualifiedNameAccess().getValidIDParserRuleCall_0()); } pushFollow(FOLLOW_12); this_ValidID_0=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { current.merge(this_ValidID_0); } if ( state.backtracking==0 ) { afterParserOrEnumRuleCall(); } // InternalXtype.g:787:3: (kw= '.' this_ValidID_2= ruleValidID )* loop15: do { int alt15=2; int LA15_0 = input.LA(1); if ( (LA15_0==18) ) { int LA15_2 = input.LA(2); if ( (LA15_2==RULE_ID) ) { alt15=1; } } switch (alt15) { case 1 : // InternalXtype.g:788:4: kw= '.' this_ValidID_2= ruleValidID { kw=(Token)match(input,18,FOLLOW_13); if (state.failed) return current; if ( state.backtracking==0 ) { current.merge(kw); newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getFullStopKeyword_1_0()); } if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getQualifiedNameAccess().getValidIDParserRuleCall_1_1()); } pushFollow(FOLLOW_12); this_ValidID_2=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { current.merge(this_ValidID_2); } if ( state.backtracking==0 ) { afterParserOrEnumRuleCall(); } } break; default : break loop15; } } while (true); } } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[ruleQualifiedName, return_type[type[AntlrDatatypeRuleToken]], modifier[final public], parameter[]] begin[{] local_variable[type[AntlrDatatypeRuleToken], current] local_variable[type[Token], kw] local_variable[type[AntlrDatatypeRuleToken], this_ValidID_0] local_variable[type[AntlrDatatypeRuleToken], this_ValidID_2] 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=getQualifiedNameAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getValidIDParserRuleCall_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_12, 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_ValidID_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleValidID, 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=[MemberReference(member=this_ValidID_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=current, 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=[], 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=alt15)], 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=LA15_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA15_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=18), 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=LA15_2)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA15_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RULE_ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt15, 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=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=18), MemberReference(member=FOLLOW_13, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), 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=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=current, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getQualifiedNameAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getFullStopKeyword_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, 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=getQualifiedNameAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getValidIDParserRuleCall_1_1, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_12, 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_ValidID_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleValidID, 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=[MemberReference(member=this_ValidID_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=current, 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=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=loop15, label=None)])], expression=MemberReference(member=alt15, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop15)])]), 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[AntlrDatatypeRuleToken] identifier[ruleQualifiedName] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[AntlrDatatypeRuleToken] identifier[current] operator[=] Keyword[new] identifier[AntlrDatatypeRuleToken] operator[SEP] operator[SEP] operator[SEP] identifier[Token] identifier[kw] operator[=] Other[null] operator[SEP] identifier[AntlrDatatypeRuleToken] identifier[this_ValidID_0] operator[=] Other[null] operator[SEP] identifier[AntlrDatatypeRuleToken] identifier[this_ValidID_2] 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[getQualifiedNameAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getValidIDParserRuleCall_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_12] operator[SEP] operator[SEP] identifier[this_ValidID_0] operator[=] identifier[ruleValidID] 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[SEP] identifier[merge] operator[SEP] identifier[this_ValidID_0] operator[SEP] 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] } identifier[loop15] operator[:] Keyword[do] { Keyword[int] identifier[alt15] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA15_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA15_0] operator[==] Other[18] operator[SEP] operator[SEP] { Keyword[int] identifier[LA15_2] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA15_2] operator[==] identifier[RULE_ID] operator[SEP] operator[SEP] { identifier[alt15] operator[=] Other[1] operator[SEP] } } Keyword[switch] operator[SEP] identifier[alt15] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[kw] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[18] , identifier[FOLLOW_13] operator[SEP] 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[SEP] identifier[merge] operator[SEP] identifier[kw] operator[SEP] operator[SEP] identifier[newLeafNode] operator[SEP] identifier[kw] , identifier[grammarAccess] operator[SEP] identifier[getQualifiedNameAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getFullStopKeyword_1_0] 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[getQualifiedNameAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getValidIDParserRuleCall_1_1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_12] operator[SEP] operator[SEP] identifier[this_ValidID_2] operator[=] identifier[ruleValidID] 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[SEP] identifier[merge] operator[SEP] identifier[this_ValidID_2] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[loop15] 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] }
public boolean isInState(JComponent c) { return (c instanceof JTabbedPane && ((JTabbedPane) c).getTabPlacement() == JTabbedPane.LEFT); }
class class_name[name] begin[{] method[isInState, return_type[type[boolean]], modifier[public], parameter[c]] begin[{] return[binary_operation[binary_operation[member[.c], instanceof, type[JTabbedPane]], &&, binary_operation[Cast(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JTabbedPane, sub_type=None)), ==, member[JTabbedPane.LEFT]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isInState] operator[SEP] identifier[JComponent] identifier[c] operator[SEP] { Keyword[return] operator[SEP] identifier[c] Keyword[instanceof] identifier[JTabbedPane] operator[&&] operator[SEP] operator[SEP] identifier[JTabbedPane] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[getTabPlacement] operator[SEP] operator[SEP] operator[==] identifier[JTabbedPane] operator[SEP] identifier[LEFT] operator[SEP] operator[SEP] }
public Collection<NrqlAlertCondition> list(long policyId, String name) { List<NrqlAlertCondition> ret = new ArrayList<NrqlAlertCondition>(); Collection<NrqlAlertCondition> conditions = list(policyId); for(NrqlAlertCondition condition : conditions) { if(condition.getName().equals(name)) ret.add(condition); } return ret; }
class class_name[name] begin[{] method[list, return_type[type[Collection]], modifier[public], parameter[policyId, name]] begin[{] local_variable[type[List], ret] local_variable[type[Collection], conditions] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=condition, selectors=[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=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=condition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=ret, selectors=[], type_arguments=None), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=conditions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=condition)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NrqlAlertCondition, sub_type=None))), label=None) return[member[.ret]] end[}] END[}]
Keyword[public] identifier[Collection] operator[<] identifier[NrqlAlertCondition] operator[>] identifier[list] operator[SEP] Keyword[long] identifier[policyId] , identifier[String] identifier[name] operator[SEP] { identifier[List] operator[<] identifier[NrqlAlertCondition] operator[>] identifier[ret] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[NrqlAlertCondition] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[NrqlAlertCondition] operator[>] identifier[conditions] operator[=] identifier[list] operator[SEP] identifier[policyId] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[NrqlAlertCondition] identifier[condition] operator[:] identifier[conditions] operator[SEP] { Keyword[if] operator[SEP] identifier[condition] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[add] operator[SEP] identifier[condition] operator[SEP] operator[SEP] } Keyword[return] identifier[ret] operator[SEP] }
public static Titan0Vertex createVertex(Titan0Graph graph, Vertex source) { if (source == null) { return null; } return new Titan0Vertex(graph, source); }
class class_name[name] begin[{] method[createVertex, return_type[type[Titan0Vertex]], modifier[public static], parameter[graph, source]] begin[{] if[binary_operation[member[.source], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=graph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=source, 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=Titan0Vertex, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Titan0Vertex] identifier[createVertex] operator[SEP] identifier[Titan0Graph] identifier[graph] , identifier[Vertex] identifier[source] operator[SEP] { Keyword[if] operator[SEP] identifier[source] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] Keyword[new] identifier[Titan0Vertex] operator[SEP] identifier[graph] , identifier[source] operator[SEP] operator[SEP] }
public static void sortByNumberOfVersionsDesc(List<ClasspathResource> resources) { // sort by number of version occurrences Comparator<ClasspathResource> sortByNumberOfVersionsDesc = new Comparator<ClasspathResource>() { @Override public int compare(ClasspathResource resource1, ClasspathResource resource2) { return -1 * new Integer(resource1.getResourceFileVersions().size()).compareTo(resource2.getResourceFileVersions().size()); } }; Collections.sort(resources, sortByNumberOfVersionsDesc); }
class class_name[name] begin[{] method[sortByNumberOfVersionsDesc, return_type[void], modifier[public static], parameter[resources]] begin[{] local_variable[type[Comparator], sortByNumberOfVersionsDesc] call[Collections.sort, parameter[member[.resources], member[.sortByNumberOfVersionsDesc]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[sortByNumberOfVersionsDesc] operator[SEP] identifier[List] operator[<] identifier[ClasspathResource] operator[>] identifier[resources] operator[SEP] { identifier[Comparator] operator[<] identifier[ClasspathResource] operator[>] identifier[sortByNumberOfVersionsDesc] operator[=] Keyword[new] identifier[Comparator] operator[<] identifier[ClasspathResource] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compare] operator[SEP] identifier[ClasspathResource] identifier[resource1] , identifier[ClasspathResource] identifier[resource2] operator[SEP] { Keyword[return] operator[-] Other[1] operator[*] Keyword[new] identifier[Integer] operator[SEP] identifier[resource1] operator[SEP] identifier[getResourceFileVersions] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[resource2] operator[SEP] identifier[getResourceFileVersions] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[resources] , identifier[sortByNumberOfVersionsDesc] operator[SEP] operator[SEP] }
public boolean goForward() { if (currentNode.hasChildren()) { currentNode = currentNode.getChildren().get(0); return true; } else if (currentNode.getParent() == null) { return false; } while (true) { N parent = currentNode.getParent(); if ((parent == null) || (currentNode == tree)) { return false; } int index = parent.getChildren().indexOf(currentNode); if (parent.getChildren().size() > index + 1) { currentNode = parent.getChildren().get(index + 1); return true; } else { currentNode = parent; } } }
class class_name[name] begin[{] method[goForward, return_type[type[boolean]], modifier[public], parameter[]] begin[{] if[call[currentNode.hasChildren, parameter[]]] begin[{] assign[member[.currentNode], call[currentNode.getChildren, parameter[]]] return[literal[true]] else begin[{] if[binary_operation[call[currentNode.getParent, parameter[]], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] end[}] while[literal[true]] begin[{] local_variable[type[N], parent] if[binary_operation[binary_operation[member[.parent], ==, literal[null]], ||, binary_operation[member[.currentNode], ==, member[.tree]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[int], index] if[binary_operation[call[parent.getChildren, parameter[]], >, binary_operation[member[.index], +, literal[1]]]] begin[{] assign[member[.currentNode], call[parent.getChildren, parameter[]]] return[literal[true]] else begin[{] assign[member[.currentNode], member[.parent]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[goForward] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[currentNode] operator[SEP] identifier[hasChildren] operator[SEP] operator[SEP] operator[SEP] { identifier[currentNode] operator[=] identifier[currentNode] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[currentNode] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[while] operator[SEP] literal[boolean] operator[SEP] { identifier[N] identifier[parent] operator[=] identifier[currentNode] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[parent] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[currentNode] operator[==] identifier[tree] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[int] identifier[index] operator[=] identifier[parent] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] identifier[currentNode] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parent] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] identifier[index] operator[+] Other[1] operator[SEP] { identifier[currentNode] operator[=] identifier[parent] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { identifier[currentNode] operator[=] identifier[parent] operator[SEP] } } }
protected Retriever createRetriever() { return new Retriever() { @Override public String retrieve(String name) { return properties.getProperty(name); } }; }
class class_name[name] begin[{] method[createRetriever, return_type[type[Retriever]], modifier[protected], parameter[]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=retrieve, parameters=[FormalParameter(annotations=[], modifiers=set(), name=name, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Retriever, sub_type=None))] end[}] END[}]
Keyword[protected] identifier[Retriever] identifier[createRetriever] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[Retriever] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[retrieve] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[properties] operator[SEP] identifier[getProperty] operator[SEP] identifier[name] operator[SEP] operator[SEP] } } operator[SEP] }
public synchronized void remove( Entry entry ) { List<Entry> entries; if ( entry == null ) { return; } DirectoryEntry parent = entry.getParent(); if ( parent == null ) { return; } else { entries = contents.get( parent ); if ( entries == null ) { return; } } for ( Iterator<Entry> i = entries.iterator(); i.hasNext(); ) { Entry e = (Entry) i.next(); if ( entry.equals( e ) ) { if ( e instanceof DirectoryEntry ) { Entry[] children = listEntries( (DirectoryEntry) e ); for ( int j = children.length - 1; j >= 0; j-- ) { remove( children[j] ); } contents.remove( e ); } i.remove(); return; } } }
class class_name[name] begin[{] method[remove, return_type[void], modifier[synchronized public], parameter[entry]] begin[{] local_variable[type[List], entries] if[binary_operation[member[.entry], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[DirectoryEntry], parent] if[binary_operation[member[.parent], ==, literal[null]]] begin[{] return[None] else begin[{] assign[member[.entries], call[contents.get, parameter[member[.parent]]]] if[binary_operation[member[.entries], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Entry, sub_type=None)), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Entry, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=DirectoryEntry, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Cast(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DirectoryEntry, sub_type=None))], member=listEntries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=children)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Entry, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=children, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=children, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=contents, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]))]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=entries, selectors=[], type_arguments=None), name=i)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Entry, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[remove] operator[SEP] identifier[Entry] identifier[entry] operator[SEP] { identifier[List] operator[<] identifier[Entry] operator[>] identifier[entries] operator[SEP] Keyword[if] operator[SEP] identifier[entry] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[DirectoryEntry] identifier[parent] operator[=] identifier[entry] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parent] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } Keyword[else] { identifier[entries] operator[=] identifier[contents] operator[SEP] identifier[get] operator[SEP] identifier[parent] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entries] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } } Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[Entry] operator[>] identifier[i] operator[=] identifier[entries] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[Entry] identifier[e] operator[=] operator[SEP] identifier[Entry] operator[SEP] identifier[i] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[equals] operator[SEP] identifier[e] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[e] Keyword[instanceof] identifier[DirectoryEntry] operator[SEP] { identifier[Entry] operator[SEP] operator[SEP] identifier[children] operator[=] identifier[listEntries] operator[SEP] operator[SEP] identifier[DirectoryEntry] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[children] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] identifier[j] operator[>=] Other[0] operator[SEP] identifier[j] operator[--] operator[SEP] { identifier[remove] operator[SEP] identifier[children] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] } identifier[contents] operator[SEP] identifier[remove] operator[SEP] identifier[e] operator[SEP] operator[SEP] } identifier[i] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } } }
public final void expurge() { final Iterator<Entry<K, ReferencableValue<K, V>>> iter = this.map.entrySet().iterator(); Entry<K, ReferencableValue<K, V>> entry; ReferencableValue<K, V> value; while (iter.hasNext()) { entry = iter.next(); if (entry != null) { value = entry.getValue(); if ((value != null) && ((value.isEnqueued()) || (value.get() == null))) { value.enqueue(); value.clear(); } } } Reference<? extends V> reference; while ((reference = this.queue.poll()) != null) { if (reference instanceof ReferencableValue<?, ?>) { this.map.remove(((ReferencableValue<?, ?>) reference).getKey()); } reference.clear(); } }
class class_name[name] begin[{] method[expurge, return_type[void], modifier[final public], parameter[]] begin[{] local_variable[type[Iterator], iter] local_variable[type[Entry], entry] local_variable[type[ReferencableValue], value] while[call[iter.hasNext, parameter[]]] begin[{] assign[member[.entry], call[iter.next, parameter[]]] if[binary_operation[member[.entry], !=, literal[null]]] begin[{] assign[member[.value], call[entry.getValue, parameter[]]] if[binary_operation[binary_operation[member[.value], !=, literal[null]], &&, binary_operation[call[value.isEnqueued, parameter[]], ||, binary_operation[call[value.get, parameter[]], ==, literal[null]]]]] begin[{] call[value.enqueue, parameter[]] call[value.clear, parameter[]] else begin[{] None end[}] else begin[{] None end[}] end[}] local_variable[type[Reference], reference] while[binary_operation[assign[member[.reference], THIS[member[None.queue]call[None.poll, parameter[]]]], !=, literal[null]]] begin[{] if[binary_operation[member[.reference], instanceof, type[ReferencableValue]]] begin[{] THIS[member[None.map]call[None.remove, parameter[Cast(expression=MemberReference(member=reference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=ReferencableValue, sub_type=None))]]] else begin[{] None end[}] call[reference.clear, parameter[]] end[}] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[expurge] operator[SEP] operator[SEP] { Keyword[final] identifier[Iterator] operator[<] identifier[Entry] operator[<] identifier[K] , identifier[ReferencableValue] operator[<] identifier[K] , identifier[V] operator[>] operator[>] operator[>] identifier[iter] operator[=] Keyword[this] operator[SEP] identifier[map] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[Entry] operator[<] identifier[K] , identifier[ReferencableValue] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[entry] operator[SEP] identifier[ReferencableValue] operator[<] identifier[K] , identifier[V] operator[>] identifier[value] operator[SEP] Keyword[while] operator[SEP] identifier[iter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[entry] operator[=] identifier[iter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entry] operator[!=] Other[null] operator[SEP] { identifier[value] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[isEnqueued] operator[SEP] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[value] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] operator[SEP] operator[SEP] { identifier[value] operator[SEP] identifier[enqueue] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } } } identifier[Reference] operator[<] operator[?] Keyword[extends] identifier[V] operator[>] identifier[reference] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[reference] operator[=] Keyword[this] operator[SEP] identifier[queue] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[reference] Keyword[instanceof] identifier[ReferencableValue] operator[<] operator[?] , operator[?] operator[>] operator[SEP] { Keyword[this] operator[SEP] identifier[map] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] identifier[ReferencableValue] operator[<] operator[?] , operator[?] operator[>] operator[SEP] identifier[reference] operator[SEP] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[reference] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } }
@Override public void initializeApplication(ApplicationDefinition oldAppDef, ApplicationDefinition appDef) { checkServiceState(); verifyApplicationCFs(oldAppDef, appDef); }
class class_name[name] begin[{] method[initializeApplication, return_type[void], modifier[public], parameter[oldAppDef, appDef]] begin[{] call[.checkServiceState, parameter[]] call[.verifyApplicationCFs, parameter[member[.oldAppDef], member[.appDef]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[initializeApplication] operator[SEP] identifier[ApplicationDefinition] identifier[oldAppDef] , identifier[ApplicationDefinition] identifier[appDef] operator[SEP] { identifier[checkServiceState] operator[SEP] operator[SEP] operator[SEP] identifier[verifyApplicationCFs] operator[SEP] identifier[oldAppDef] , identifier[appDef] operator[SEP] operator[SEP] }
@Override public List<String> getStringList( final String key, final List<String> defaultValue ) { return getStringList( key, DEFAULT_LIST_DELIMITER, defaultValue ); }
class class_name[name] begin[{] method[getStringList, return_type[type[List]], modifier[public], parameter[key, defaultValue]] begin[{] return[call[.getStringList, parameter[member[.key], member[.DEFAULT_LIST_DELIMITER], member[.defaultValue]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getStringList] operator[SEP] Keyword[final] identifier[String] identifier[key] , Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[defaultValue] operator[SEP] { Keyword[return] identifier[getStringList] operator[SEP] identifier[key] , identifier[DEFAULT_LIST_DELIMITER] , identifier[defaultValue] operator[SEP] operator[SEP] }
public String explain(Where where) throws SqlParseException { List<String> codes = new ArrayList<String>(); while (where.getWheres().size() == 1) { where = where.getWheres().getFirst(); } explainWhere(codes, where); String relation = where.getConn().name().equals("AND") ? " && " : " || "; return Joiner.on(relation).join(codes); }
class class_name[name] begin[{] method[explain, return_type[type[String]], modifier[public], parameter[where]] begin[{] local_variable[type[List], codes] while[binary_operation[call[where.getWheres, parameter[]], ==, literal[1]]] begin[{] assign[member[.where], call[where.getWheres, parameter[]]] end[}] call[.explainWhere, parameter[member[.codes], member[.where]]] local_variable[type[String], relation] return[call[Joiner.on, parameter[member[.relation]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[explain] operator[SEP] identifier[Where] identifier[where] operator[SEP] Keyword[throws] identifier[SqlParseException] { identifier[List] operator[<] identifier[String] operator[>] identifier[codes] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[where] operator[SEP] identifier[getWheres] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { identifier[where] operator[=] identifier[where] operator[SEP] identifier[getWheres] operator[SEP] operator[SEP] operator[SEP] identifier[getFirst] operator[SEP] operator[SEP] operator[SEP] } identifier[explainWhere] operator[SEP] identifier[codes] , identifier[where] operator[SEP] operator[SEP] identifier[String] identifier[relation] operator[=] identifier[where] operator[SEP] identifier[getConn] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[?] literal[String] operator[:] literal[String] operator[SEP] Keyword[return] identifier[Joiner] operator[SEP] identifier[on] operator[SEP] identifier[relation] operator[SEP] operator[SEP] identifier[join] operator[SEP] identifier[codes] operator[SEP] operator[SEP] }
public void appendOptionalAttribute(final String name, final boolean flag, final Object value) { if (flag) { appendAttribute(name, value); } }
class class_name[name] begin[{] method[appendOptionalAttribute, return_type[void], modifier[public], parameter[name, flag, value]] begin[{] if[member[.flag]] begin[{] call[.appendAttribute, parameter[member[.name], member[.value]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[appendOptionalAttribute] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] Keyword[boolean] identifier[flag] , Keyword[final] identifier[Object] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[flag] operator[SEP] { identifier[appendAttribute] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] } }
@Override public void onConnect(int rst, HuaweiApiClient client) { HMSAgentLog.d("onConnect:" + rst); Activity activityCur = ActivityMgr.INST.getLastActivity(); if (activityCur != null && client != null) { client.checkUpdate(activityCur, this); } else if (activity != null && client != null){ client.checkUpdate(activity, this); } else { // 跟SE确认:activity 为 null , 不处理 | Activity is null and does not need to be processed HMSAgentLog.e("no activity to checkUpdate"); onCheckUpdateResult(HMSAgent.AgentResultCode.NO_ACTIVITY_FOR_USE); return; } }
class class_name[name] begin[{] method[onConnect, return_type[void], modifier[public], parameter[rst, client]] begin[{] call[HMSAgentLog.d, parameter[binary_operation[literal["onConnect:"], +, member[.rst]]]] local_variable[type[Activity], activityCur] if[binary_operation[binary_operation[member[.activityCur], !=, literal[null]], &&, binary_operation[member[.client], !=, literal[null]]]] begin[{] call[client.checkUpdate, parameter[member[.activityCur], THIS[]]] else begin[{] if[binary_operation[binary_operation[member[.activity], !=, literal[null]], &&, binary_operation[member[.client], !=, literal[null]]]] begin[{] call[client.checkUpdate, parameter[member[.activity], THIS[]]] else begin[{] call[HMSAgentLog.e, parameter[literal["no activity to checkUpdate"]]] call[.onCheckUpdateResult, parameter[member[HMSAgent.AgentResultCode.NO_ACTIVITY_FOR_USE]]] return[None] end[}] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onConnect] operator[SEP] Keyword[int] identifier[rst] , identifier[HuaweiApiClient] identifier[client] operator[SEP] { identifier[HMSAgentLog] operator[SEP] identifier[d] operator[SEP] literal[String] operator[+] identifier[rst] operator[SEP] operator[SEP] identifier[Activity] identifier[activityCur] operator[=] identifier[ActivityMgr] operator[SEP] identifier[INST] operator[SEP] identifier[getLastActivity] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[activityCur] operator[!=] Other[null] operator[&&] identifier[client] operator[!=] Other[null] operator[SEP] { identifier[client] operator[SEP] identifier[checkUpdate] operator[SEP] identifier[activityCur] , Keyword[this] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[activity] operator[!=] Other[null] operator[&&] identifier[client] operator[!=] Other[null] operator[SEP] { identifier[client] operator[SEP] identifier[checkUpdate] operator[SEP] identifier[activity] , Keyword[this] operator[SEP] operator[SEP] } Keyword[else] { identifier[HMSAgentLog] operator[SEP] identifier[e] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[onCheckUpdateResult] operator[SEP] identifier[HMSAgent] operator[SEP] identifier[AgentResultCode] operator[SEP] identifier[NO_ACTIVITY_FOR_USE] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } }
protected JavaSource getJavaSourceForClass(String clazzname) { String resource = clazzname.replaceAll("\\.", "/") + ".java"; FileObject fileObject = classPath.findResource(resource); if (fileObject == null) { return null; } Project project = FileOwnerQuery.getOwner(fileObject); if (project == null) { return null; } SourceGroup[] sourceGroups = ProjectUtils.getSources(project).getSourceGroups("java"); for (SourceGroup sourceGroup : sourceGroups) { return JavaSource.create(ClasspathInfo.create(sourceGroup.getRootFolder())); } return null; }
class class_name[name] begin[{] method[getJavaSourceForClass, return_type[type[JavaSource]], modifier[protected], parameter[clazzname]] begin[{] local_variable[type[String], resource] local_variable[type[FileObject], fileObject] if[binary_operation[member[.fileObject], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Project], project] if[binary_operation[member[.project], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[SourceGroup], sourceGroups] ForStatement(body=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRootFolder, postfix_operators=[], prefix_operators=[], qualifier=sourceGroup, selectors=[], type_arguments=None)], member=create, postfix_operators=[], prefix_operators=[], qualifier=ClasspathInfo, selectors=[], type_arguments=None)], member=create, postfix_operators=[], prefix_operators=[], qualifier=JavaSource, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=sourceGroups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sourceGroup)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SourceGroup, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[protected] identifier[JavaSource] identifier[getJavaSourceForClass] operator[SEP] identifier[String] identifier[clazzname] operator[SEP] { identifier[String] identifier[resource] operator[=] identifier[clazzname] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[+] literal[String] operator[SEP] identifier[FileObject] identifier[fileObject] operator[=] identifier[classPath] operator[SEP] identifier[findResource] operator[SEP] identifier[resource] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fileObject] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[Project] identifier[project] operator[=] identifier[FileOwnerQuery] operator[SEP] identifier[getOwner] operator[SEP] identifier[fileObject] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[project] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[SourceGroup] operator[SEP] operator[SEP] identifier[sourceGroups] operator[=] identifier[ProjectUtils] operator[SEP] identifier[getSources] operator[SEP] identifier[project] operator[SEP] operator[SEP] identifier[getSourceGroups] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[SourceGroup] identifier[sourceGroup] operator[:] identifier[sourceGroups] operator[SEP] { Keyword[return] identifier[JavaSource] operator[SEP] identifier[create] operator[SEP] identifier[ClasspathInfo] operator[SEP] identifier[create] operator[SEP] identifier[sourceGroup] operator[SEP] identifier[getRootFolder] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
private void checkIfMeterExists(final AbstractMeter meter) { if (!meterResults.containsKey(meter)) { meterResults.put(meter, new LinkedList<Double>()); } }
class class_name[name] begin[{] method[checkIfMeterExists, return_type[void], modifier[private], parameter[meter]] begin[{] if[call[meterResults.containsKey, parameter[member[.meter]]]] begin[{] call[meterResults.put, parameter[member[.meter], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Double, sub_type=None))], dimensions=None, name=LinkedList, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[checkIfMeterExists] operator[SEP] Keyword[final] identifier[AbstractMeter] identifier[meter] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[meterResults] operator[SEP] identifier[containsKey] operator[SEP] identifier[meter] operator[SEP] operator[SEP] { identifier[meterResults] operator[SEP] identifier[put] operator[SEP] identifier[meter] , Keyword[new] identifier[LinkedList] operator[<] identifier[Double] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public synchronized boolean lockdown(ConnectionException connectionException) { // If we are already in a lockdown state, don't change anything if (isLockedDown()) { return false; } if (connectionException != null && connectionException.getRecommendedLockdownTime() != null) { lockdownTime = connectionException.getRecommendedLockdownTime(); } else if (lockdownTime != 0) { lockdownTime = lockdownTime * 2; } else { lockdownTime = baseLockdownTime; } lockdownTime = Math.min(maxLockdownTime, lockdownTime); lockdownStartTime = clock.date(); return true; }
class class_name[name] begin[{] method[lockdown, return_type[type[boolean]], modifier[synchronized public], parameter[connectionException]] begin[{] if[call[.isLockedDown, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.connectionException], !=, literal[null]], &&, binary_operation[call[connectionException.getRecommendedLockdownTime, parameter[]], !=, literal[null]]]] begin[{] assign[member[.lockdownTime], call[connectionException.getRecommendedLockdownTime, parameter[]]] else begin[{] if[binary_operation[member[.lockdownTime], !=, literal[0]]] begin[{] assign[member[.lockdownTime], binary_operation[member[.lockdownTime], *, literal[2]]] else begin[{] assign[member[.lockdownTime], member[.baseLockdownTime]] end[}] end[}] assign[member[.lockdownTime], call[Math.min, parameter[member[.maxLockdownTime], member[.lockdownTime]]]] assign[member[.lockdownStartTime], call[clock.date, parameter[]]] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[boolean] identifier[lockdown] operator[SEP] identifier[ConnectionException] identifier[connectionException] operator[SEP] { Keyword[if] operator[SEP] identifier[isLockedDown] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[connectionException] operator[!=] Other[null] operator[&&] identifier[connectionException] operator[SEP] identifier[getRecommendedLockdownTime] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[lockdownTime] operator[=] identifier[connectionException] operator[SEP] identifier[getRecommendedLockdownTime] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[lockdownTime] operator[!=] Other[0] operator[SEP] { identifier[lockdownTime] operator[=] identifier[lockdownTime] operator[*] Other[2] operator[SEP] } Keyword[else] { identifier[lockdownTime] operator[=] identifier[baseLockdownTime] operator[SEP] } identifier[lockdownTime] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[maxLockdownTime] , identifier[lockdownTime] operator[SEP] operator[SEP] identifier[lockdownStartTime] operator[=] identifier[clock] operator[SEP] identifier[date] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public static final <M> Window createWindow(AbstractViewController<M> viewBinder) { Assert.requireNonNull(viewBinder, "viewBinder"); return new DolphinWindow<M>(viewBinder); }
class class_name[name] begin[{] method[createWindow, return_type[type[Window]], modifier[final public static], parameter[viewBinder]] begin[{] call[Assert.requireNonNull, parameter[member[.viewBinder], literal["viewBinder"]]] return[ClassCreator(arguments=[MemberReference(member=viewBinder, 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=M, sub_type=None))], dimensions=None, name=DolphinWindow, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] operator[<] identifier[M] operator[>] identifier[Window] identifier[createWindow] operator[SEP] identifier[AbstractViewController] operator[<] identifier[M] operator[>] identifier[viewBinder] operator[SEP] { identifier[Assert] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[viewBinder] , literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[DolphinWindow] operator[<] identifier[M] operator[>] operator[SEP] identifier[viewBinder] operator[SEP] operator[SEP] }
public static HistogramDataPoint decodeHistogramDataPoint(final TSDB tsdb, final long base_time, final byte[] qualifier, final byte[] value) { final HistogramDataPointCodec decoder = tsdb.histogramManager().getCodec((int) value[0]); long timestamp = getTimeStampFromNonDP(base_time, qualifier); final Histogram histogram = decoder.decode(value, true); return new SimpleHistogramDataPointAdapter(histogram, timestamp); }
class class_name[name] begin[{] method[decodeHistogramDataPoint, return_type[type[HistogramDataPoint]], modifier[public static], parameter[tsdb, base_time, qualifier, value]] begin[{] local_variable[type[HistogramDataPointCodec], decoder] local_variable[type[long], timestamp] local_variable[type[Histogram], histogram] return[ClassCreator(arguments=[MemberReference(member=histogram, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=timestamp, 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=SimpleHistogramDataPointAdapter, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[HistogramDataPoint] identifier[decodeHistogramDataPoint] operator[SEP] Keyword[final] identifier[TSDB] identifier[tsdb] , Keyword[final] Keyword[long] identifier[base_time] , Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[qualifier] , Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[value] operator[SEP] { Keyword[final] identifier[HistogramDataPointCodec] identifier[decoder] operator[=] identifier[tsdb] operator[SEP] identifier[histogramManager] operator[SEP] operator[SEP] operator[SEP] identifier[getCodec] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[value] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[timestamp] operator[=] identifier[getTimeStampFromNonDP] operator[SEP] identifier[base_time] , identifier[qualifier] operator[SEP] operator[SEP] Keyword[final] identifier[Histogram] identifier[histogram] operator[=] identifier[decoder] operator[SEP] identifier[decode] operator[SEP] identifier[value] , literal[boolean] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[SimpleHistogramDataPointAdapter] operator[SEP] identifier[histogram] , identifier[timestamp] operator[SEP] operator[SEP] }
public UnsupportedOperationException asJDKException() { UnsupportedOperationException e = new UnsupportedOperationException(getMessage()) { @Override public synchronized Throwable fillInStackTrace() { return this; } }; e.setStackTrace(getStackTrace()); return e; }
class class_name[name] begin[{] method[asJDKException, return_type[type[UnsupportedOperationException]], modifier[public], parameter[]] begin[{] local_variable[type[UnsupportedOperationException], e] call[e.setStackTrace, parameter[call[.getStackTrace, parameter[]]]] return[member[.e]] end[}] END[}]
Keyword[public] identifier[UnsupportedOperationException] identifier[asJDKException] operator[SEP] operator[SEP] { identifier[UnsupportedOperationException] identifier[e] operator[=] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] identifier[Throwable] identifier[fillInStackTrace] operator[SEP] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] } } operator[SEP] identifier[e] operator[SEP] identifier[setStackTrace] operator[SEP] identifier[getStackTrace] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[e] operator[SEP] }
String getJCAContextProviderName(Class<?> workContextClass) { ServiceReference<JCAContextProvider> ref = null; for (Class<?> cl = workContextClass; ref == null && cl != null; cl = cl.getSuperclass()) ref = contextProviders.getReference(cl.getName()); String name = ref == null ? null : (String) ref.getProperty(JCAContextProvider.CONTEXT_NAME); if (name == null && ref != null) name = (String) ref.getProperty("component.name"); return name; }
class class_name[name] begin[{] method[getJCAContextProviderName, return_type[type[String]], modifier[default], parameter[workContextClass]] begin[{] local_variable[type[ServiceReference], ref] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=cl, selectors=[], type_arguments=None)], member=getReference, postfix_operators=[], prefix_operators=[], qualifier=contextProviders, selectors=[], type_arguments=None)), label=None), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MemberReference(member=cl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=workContextClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=cl)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), update=[Assignment(expressionl=MemberReference(member=cl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getSuperclass, postfix_operators=[], prefix_operators=[], qualifier=cl, selectors=[], type_arguments=None))]), label=None) local_variable[type[String], name] if[binary_operation[binary_operation[member[.name], ==, literal[null]], &&, binary_operation[member[.ref], !=, literal[null]]]] begin[{] assign[member[.name], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="component.name")], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=ref, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))] else begin[{] None end[}] return[member[.name]] end[}] END[}]
identifier[String] identifier[getJCAContextProviderName] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[workContextClass] operator[SEP] { identifier[ServiceReference] operator[<] identifier[JCAContextProvider] operator[>] identifier[ref] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[cl] operator[=] identifier[workContextClass] operator[SEP] identifier[ref] operator[==] Other[null] operator[&&] identifier[cl] operator[!=] Other[null] operator[SEP] identifier[cl] operator[=] identifier[cl] operator[SEP] identifier[getSuperclass] operator[SEP] operator[SEP] operator[SEP] identifier[ref] operator[=] identifier[contextProviders] operator[SEP] identifier[getReference] operator[SEP] identifier[cl] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[name] operator[=] identifier[ref] operator[==] Other[null] operator[?] Other[null] operator[:] operator[SEP] identifier[String] operator[SEP] identifier[ref] operator[SEP] identifier[getProperty] operator[SEP] identifier[JCAContextProvider] operator[SEP] identifier[CONTEXT_NAME] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[&&] identifier[ref] operator[!=] Other[null] operator[SEP] identifier[name] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[ref] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[name] operator[SEP] }
public com.google.api.ads.admanager.axis.v201811.VideoRedirectAsset getMezzanineFile() { return mezzanineFile; }
class class_name[name] begin[{] method[getMezzanineFile, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.mezzanineFile]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201811] operator[SEP] identifier[VideoRedirectAsset] identifier[getMezzanineFile] operator[SEP] operator[SEP] { Keyword[return] identifier[mezzanineFile] operator[SEP] }
public static Date addDay(String date, int amount) throws ParseException { return add(date, Calendar.DATE, amount); }
class class_name[name] begin[{] method[addDay, return_type[type[Date]], modifier[public static], parameter[date, amount]] begin[{] return[call[.add, parameter[member[.date], member[Calendar.DATE], member[.amount]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Date] identifier[addDay] operator[SEP] identifier[String] identifier[date] , Keyword[int] identifier[amount] operator[SEP] Keyword[throws] identifier[ParseException] { Keyword[return] identifier[add] operator[SEP] identifier[date] , identifier[Calendar] operator[SEP] identifier[DATE] , identifier[amount] operator[SEP] operator[SEP] }
private boolean isJarFile(URL resourceLocation) { String resourceLocationString = resourceLocation.toExternalForm(); return resourceLocationString.startsWith("jar:file:") || resourceLocationString.contains(".jar!"); }
class class_name[name] begin[{] method[isJarFile, return_type[type[boolean]], modifier[private], parameter[resourceLocation]] begin[{] local_variable[type[String], resourceLocationString] return[binary_operation[call[resourceLocationString.startsWith, parameter[literal["jar:file:"]]], ||, call[resourceLocationString.contains, parameter[literal[".jar!"]]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isJarFile] operator[SEP] identifier[URL] identifier[resourceLocation] operator[SEP] { identifier[String] identifier[resourceLocationString] operator[=] identifier[resourceLocation] operator[SEP] identifier[toExternalForm] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[resourceLocationString] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[resourceLocationString] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] }
@Override public void actionPerformed(JTextComponent target, SyntaxDocument sDoc, int dot, ActionEvent e) { int pos = target.getCaretPosition(); int start = sDoc.getParagraphElement(pos).getStartOffset(); String line = ActionUtils.getLine(target); String lineToPos = line.substring(0, pos - start); String prefix = getIndent(line); Token t = sDoc.getTokenAt(pos); if (TokenType.isComment(t)) { if (line.trim().endsWith("*/")) { prefix = prefix.substring(0, prefix.length() - 1); } else if (line.trim().startsWith("*")) { prefix += "# "; } else if (line.trim().startsWith("##")) { prefix += "#"; } } else if (lineToPos.trim().endsWith(":")) { // check if current line is not comment prefix += getTab(target); } else { String noComment = sDoc.getUncommentedText(start, pos); // skip EOL comments if (noComment.trim().endsWith(":")) { prefix += getTab(target); } if ((lineToPos.length() > 0) && (line.equals(prefix))) { if (prefix.length() > 0) { prefix = prefix.substring(1); } } if ((lineToPos.length() == 0)) { if (prefix.length() > 0) { prefix = ""; } } } target.replaceSelection("\n" + prefix); }
class class_name[name] begin[{] method[actionPerformed, return_type[void], modifier[public], parameter[target, sDoc, dot, e]] begin[{] local_variable[type[int], pos] local_variable[type[int], start] local_variable[type[String], line] local_variable[type[String], lineToPos] local_variable[type[String], prefix] local_variable[type[Token], t] if[call[TokenType.isComment, parameter[member[.t]]]] begin[{] if[call[line.trim, parameter[]]] begin[{] assign[member[.prefix], call[prefix.substring, parameter[literal[0], binary_operation[call[prefix.length, parameter[]], -, literal[1]]]]] else begin[{] if[call[line.trim, parameter[]]] begin[{] assign[member[.prefix], literal["# "]] else begin[{] if[call[line.trim, parameter[]]] begin[{] assign[member[.prefix], literal["#"]] else begin[{] None end[}] end[}] end[}] else begin[{] if[call[lineToPos.trim, parameter[]]] begin[{] assign[member[.prefix], call[.getTab, parameter[member[.target]]]] else begin[{] local_variable[type[String], noComment] if[call[noComment.trim, parameter[]]] begin[{] assign[member[.prefix], call[.getTab, parameter[member[.target]]]] else begin[{] None end[}] if[binary_operation[binary_operation[call[lineToPos.length, parameter[]], >, literal[0]], &&, call[line.equals, parameter[member[.prefix]]]]] begin[{] if[binary_operation[call[prefix.length, parameter[]], >, literal[0]]] begin[{] assign[member[.prefix], call[prefix.substring, parameter[literal[1]]]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[call[lineToPos.length, parameter[]], ==, literal[0]]] begin[{] if[binary_operation[call[prefix.length, parameter[]], >, literal[0]]] begin[{] assign[member[.prefix], literal[""]] else begin[{] None end[}] else begin[{] None end[}] end[}] end[}] call[target.replaceSelection, parameter[binary_operation[literal["\n"], +, member[.prefix]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[JTextComponent] identifier[target] , identifier[SyntaxDocument] identifier[sDoc] , Keyword[int] identifier[dot] , identifier[ActionEvent] identifier[e] operator[SEP] { Keyword[int] identifier[pos] operator[=] identifier[target] operator[SEP] identifier[getCaretPosition] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[start] operator[=] identifier[sDoc] operator[SEP] identifier[getParagraphElement] operator[SEP] identifier[pos] operator[SEP] operator[SEP] identifier[getStartOffset] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[line] operator[=] identifier[ActionUtils] operator[SEP] identifier[getLine] operator[SEP] identifier[target] operator[SEP] operator[SEP] identifier[String] identifier[lineToPos] operator[=] identifier[line] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[pos] operator[-] identifier[start] operator[SEP] operator[SEP] identifier[String] identifier[prefix] operator[=] identifier[getIndent] operator[SEP] identifier[line] operator[SEP] operator[SEP] identifier[Token] identifier[t] operator[=] identifier[sDoc] operator[SEP] identifier[getTokenAt] operator[SEP] identifier[pos] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TokenType] operator[SEP] identifier[isComment] operator[SEP] identifier[t] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[prefix] operator[=] identifier[prefix] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[prefix] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[prefix] operator[+=] literal[String] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[prefix] operator[+=] literal[String] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[lineToPos] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[prefix] operator[+=] identifier[getTab] operator[SEP] identifier[target] operator[SEP] operator[SEP] } Keyword[else] { identifier[String] identifier[noComment] operator[=] identifier[sDoc] operator[SEP] identifier[getUncommentedText] operator[SEP] identifier[start] , identifier[pos] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[noComment] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[prefix] operator[+=] identifier[getTab] operator[SEP] identifier[target] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[lineToPos] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] operator[&&] operator[SEP] identifier[line] operator[SEP] identifier[equals] operator[SEP] identifier[prefix] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[prefix] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[prefix] operator[=] identifier[prefix] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] operator[SEP] identifier[lineToPos] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[prefix] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[prefix] operator[=] literal[String] operator[SEP] } } } identifier[target] operator[SEP] identifier[replaceSelection] operator[SEP] literal[String] operator[+] identifier[prefix] operator[SEP] operator[SEP] }
public void importArchives(String strArchiveDir, File fileDir) { if (fileDir == null) { if (!strArchiveDir.contains(",")) fileDir = new File(strArchiveDir); else { // Comma delimited file list StringTokenizer st = new StringTokenizer(strArchiveDir, ", \t\n\r\f"); while (st.hasMoreTokens()) { archiveRoot = st.nextToken(); archiveRoot = archiveRoot.replace(" ", ""); if (archiveRoot.endsWith(File.separator)) archiveRoot = archiveRoot.substring(0, archiveRoot.length() - 1); this.importArchives(archiveRoot, null); } return; } } else strArchiveDir = fileDir.getName(); Utility.getLogger().info(strArchiveDir); File[] fileList = fileDir.listFiles(); for (int i = 0; i < fileList.length; i++) { if (fileList[i].isDirectory()) { this.importArchives(strArchiveDir, fileList[i]); } else { this.importThisArchive(fileList[i]); } } }
class class_name[name] begin[{] method[importArchives, return_type[void], modifier[public], parameter[strArchiveDir, fileDir]] begin[{] if[binary_operation[member[.fileDir], ==, literal[null]]] begin[{] if[call[strArchiveDir.contains, parameter[literal[","]]]] begin[{] assign[member[.fileDir], ClassCreator(arguments=[MemberReference(member=strArchiveDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] local_variable[type[StringTokenizer], st] while[call[st.hasMoreTokens, parameter[]]] begin[{] assign[member[.archiveRoot], call[st.nextToken, parameter[]]] assign[member[.archiveRoot], call[archiveRoot.replace, parameter[literal[" "], literal[""]]]] if[call[archiveRoot.endsWith, parameter[member[File.separator]]]] begin[{] assign[member[.archiveRoot], call[archiveRoot.substring, parameter[literal[0], binary_operation[call[archiveRoot.length, parameter[]], -, literal[1]]]]] else begin[{] None end[}] THIS[call[None.importArchives, parameter[member[.archiveRoot], literal[null]]]] end[}] return[None] end[}] else begin[{] assign[member[.strArchiveDir], call[fileDir.getName, parameter[]]] end[}] call[Utility.getLogger, parameter[]] local_variable[type[File], fileList] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=fileList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=isDirectory, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=fileList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=importThisArchive, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=strArchiveDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fileList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=importArchives, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, 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=fileList, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[importArchives] operator[SEP] identifier[String] identifier[strArchiveDir] , identifier[File] identifier[fileDir] operator[SEP] { Keyword[if] operator[SEP] identifier[fileDir] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[strArchiveDir] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[fileDir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[strArchiveDir] operator[SEP] operator[SEP] Keyword[else] { identifier[StringTokenizer] identifier[st] operator[=] Keyword[new] identifier[StringTokenizer] operator[SEP] identifier[strArchiveDir] , literal[String] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[st] operator[SEP] identifier[hasMoreTokens] operator[SEP] operator[SEP] operator[SEP] { identifier[archiveRoot] operator[=] identifier[st] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] identifier[archiveRoot] operator[=] identifier[archiveRoot] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[archiveRoot] operator[SEP] identifier[endsWith] operator[SEP] identifier[File] operator[SEP] identifier[separator] operator[SEP] operator[SEP] identifier[archiveRoot] operator[=] identifier[archiveRoot] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[archiveRoot] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[importArchives] operator[SEP] identifier[archiveRoot] , Other[null] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] } } Keyword[else] identifier[strArchiveDir] operator[=] identifier[fileDir] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[Utility] operator[SEP] identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[SEP] identifier[strArchiveDir] operator[SEP] operator[SEP] identifier[File] operator[SEP] operator[SEP] identifier[fileList] operator[=] identifier[fileDir] operator[SEP] identifier[listFiles] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[fileList] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[fileList] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[importArchives] operator[SEP] identifier[strArchiveDir] , identifier[fileList] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[importThisArchive] operator[SEP] identifier[fileList] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } }
public static List<IBaseResource> toListOfResources(FhirContext theContext, IBaseBundle theBundle) { return toListOfResourcesOfType(theContext, theBundle, IBaseResource.class); }
class class_name[name] begin[{] method[toListOfResources, return_type[type[List]], modifier[public static], parameter[theContext, theBundle]] begin[{] return[call[.toListOfResourcesOfType, parameter[member[.theContext], member[.theBundle], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IBaseResource, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[IBaseResource] operator[>] identifier[toListOfResources] operator[SEP] identifier[FhirContext] identifier[theContext] , identifier[IBaseBundle] identifier[theBundle] operator[SEP] { Keyword[return] identifier[toListOfResourcesOfType] operator[SEP] identifier[theContext] , identifier[theBundle] , identifier[IBaseResource] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public void write(Engine engine, Writer writer, List<Double> inputValues, List<InputVariable> activeVariables) throws IOException { if (inputValues.isEmpty()) { writer.append("\n"); return; } if (inputValues.size() < engine.numberOfInputVariables()) { throw new RuntimeException(String.format( "[export error] engine has <%d> input variables, " + "but input data provides <%d> values", engine.numberOfInputVariables(), inputValues.size())); } if (activeVariables.size() != engine.getInputVariables().size()) { throw new RuntimeException(String.format( "[exporter error] number of active variables <%d> " + "must match the number of input variables in the engine <%d>", activeVariables.size(), engine.getInputVariables().size())); } List<Double> values = new ArrayList<Double>(); for (int i = 0; i < engine.numberOfInputVariables(); ++i) { InputVariable inputVariable = engine.getInputVariable(i); double inputValue; if (inputVariable == activeVariables.get(i)) { inputValue = inputValues.get(i); } else { inputValue = inputVariable.getValue(); } inputVariable.setValue(inputValue); if (exportInputValues) { values.add(inputValue); } } engine.process(); for (int i = 0; i < engine.numberOfOutputVariables(); ++i) { OutputVariable outputVariable = engine.getOutputVariable(i); if (exportOutputValues) { values.add(outputVariable.getValue()); } } writer.append(Op.join(values, separator)).append("\n"); }
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[engine, writer, inputValues, activeVariables]] begin[{] if[call[inputValues.isEmpty, parameter[]]] begin[{] call[writer.append, parameter[literal["\n"]]] return[None] else begin[{] None end[}] if[binary_operation[call[inputValues.size, parameter[]], <, call[engine.numberOfInputVariables, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[export error] engine has <%d> input variables, "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="but input data provides <%d> values"), operator=+), MethodInvocation(arguments=[], member=numberOfInputVariables, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=inputValues, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[call[activeVariables.size, parameter[]], !=, call[engine.getInputVariables, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[exporter error] number of active variables <%d> "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="must match the number of input variables in the engine <%d>"), operator=+), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=activeVariables, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getInputVariables, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[List], values] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInputVariable, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None), name=inputVariable)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputVariable, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=inputValue)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=inputVariable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=activeVariables, selectors=[], type_arguments=None), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=inputValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=inputVariable, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=inputValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=inputValues, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=inputValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=inputVariable, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=exportInputValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=inputValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=numberOfInputVariables, postfix_operators=[], prefix_operators=[], qualifier=engine, 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) call[engine.process, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOutputVariable, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None), name=outputVariable)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OutputVariable, sub_type=None)), IfStatement(condition=MemberReference(member=exportOutputValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=outputVariable, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=numberOfOutputVariables, postfix_operators=[], prefix_operators=[], qualifier=engine, 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) call[writer.append, parameter[call[Op.join, parameter[member[.values], member[.separator]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[Engine] identifier[engine] , identifier[Writer] identifier[writer] , identifier[List] operator[<] identifier[Double] operator[>] identifier[inputValues] , identifier[List] operator[<] identifier[InputVariable] operator[>] identifier[activeVariables] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[inputValues] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[writer] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[inputValues] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] identifier[engine] operator[SEP] identifier[numberOfInputVariables] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] operator[+] literal[String] , identifier[engine] operator[SEP] identifier[numberOfInputVariables] operator[SEP] operator[SEP] , identifier[inputValues] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[activeVariables] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[!=] identifier[engine] operator[SEP] identifier[getInputVariables] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] operator[+] literal[String] , identifier[activeVariables] operator[SEP] identifier[size] operator[SEP] operator[SEP] , identifier[engine] operator[SEP] identifier[getInputVariables] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[Double] operator[>] identifier[values] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Double] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[engine] operator[SEP] identifier[numberOfInputVariables] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[InputVariable] identifier[inputVariable] operator[=] identifier[engine] operator[SEP] identifier[getInputVariable] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[double] identifier[inputValue] operator[SEP] Keyword[if] operator[SEP] identifier[inputVariable] operator[==] identifier[activeVariables] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] { identifier[inputValue] operator[=] identifier[inputValues] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[else] { identifier[inputValue] operator[=] identifier[inputVariable] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] } identifier[inputVariable] operator[SEP] identifier[setValue] operator[SEP] identifier[inputValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[exportInputValues] operator[SEP] { identifier[values] operator[SEP] identifier[add] operator[SEP] identifier[inputValue] operator[SEP] operator[SEP] } } identifier[engine] operator[SEP] identifier[process] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[engine] operator[SEP] identifier[numberOfOutputVariables] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[OutputVariable] identifier[outputVariable] operator[=] identifier[engine] operator[SEP] identifier[getOutputVariable] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[exportOutputValues] operator[SEP] { identifier[values] operator[SEP] identifier[add] operator[SEP] identifier[outputVariable] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[writer] operator[SEP] identifier[append] operator[SEP] identifier[Op] operator[SEP] identifier[join] operator[SEP] identifier[values] , identifier[separator] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] }
protected final void forEachObserver(Consumer<O> action) { ListHelper.forEach(observers, o -> action.accept(o)); }
class class_name[name] begin[{] method[forEachObserver, return_type[void], modifier[final protected], parameter[action]] begin[{] call[ListHelper.forEach, parameter[member[.observers], LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accept, postfix_operators=[], prefix_operators=[], qualifier=action, selectors=[], type_arguments=None), parameters=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]] end[}] END[}]
Keyword[protected] Keyword[final] Keyword[void] identifier[forEachObserver] operator[SEP] identifier[Consumer] operator[<] identifier[O] operator[>] identifier[action] operator[SEP] { identifier[ListHelper] operator[SEP] identifier[forEach] operator[SEP] identifier[observers] , identifier[o] operator[->] identifier[action] operator[SEP] identifier[accept] operator[SEP] identifier[o] operator[SEP] operator[SEP] operator[SEP] }
public static CPDAvailabilityEstimate findByUuid_Last(String uuid, OrderByComparator<CPDAvailabilityEstimate> orderByComparator) throws com.liferay.commerce.exception.NoSuchCPDAvailabilityEstimateException { return getPersistence().findByUuid_Last(uuid, orderByComparator); }
class class_name[name] begin[{] method[findByUuid_Last, return_type[type[CPDAvailabilityEstimate]], modifier[public static], parameter[uuid, orderByComparator]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CPDAvailabilityEstimate] identifier[findByUuid_Last] operator[SEP] identifier[String] identifier[uuid] , identifier[OrderByComparator] operator[<] identifier[CPDAvailabilityEstimate] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[exception] operator[SEP] identifier[NoSuchCPDAvailabilityEstimateException] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[findByUuid_Last] operator[SEP] identifier[uuid] , identifier[orderByComparator] operator[SEP] operator[SEP] }
public final void xpathSeparator() throws RecognitionException { try { // src/main/resources/org/drools/compiler/lang/DRL6Expressions.g:560:5: ( DIV | QUESTION_DIV ) // src/main/resources/org/drools/compiler/lang/DRL6Expressions.g: { if ( input.LA(1)==DIV||input.LA(1)==QUESTION_DIV ) { input.consume(); state.errorRecovery=false; state.failed=false; } else { if (state.backtracking>0) {state.failed=true; return;} MismatchedSetException mse = new MismatchedSetException(null,input); throw mse; } } } catch (RecognitionException re) { throw re; } finally { // do for sure before leaving } }
class class_name[name] begin[{] method[xpathSeparator, return_type[void], modifier[final public], parameter[]] begin[{] TryStatement(block=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=MemberReference(member=DIV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=MemberReference(member=QUESTION_DIV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MismatchedSetException, sub_type=None)), name=mse)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MismatchedSetException, sub_type=None)), ThrowStatement(expression=MemberReference(member=mse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=consume, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errorRecovery, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)]))])], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[xpathSeparator] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[try] { { Keyword[if] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[==] identifier[DIV] operator[||] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[==] identifier[QUESTION_DIV] operator[SEP] { identifier[input] operator[SEP] identifier[consume] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[errorRecovery] operator[=] literal[boolean] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] { identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] Keyword[return] operator[SEP] } identifier[MismatchedSetException] identifier[mse] operator[=] Keyword[new] identifier[MismatchedSetException] operator[SEP] Other[null] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[mse] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { Keyword[throw] identifier[re] operator[SEP] } Keyword[finally] { } }
private Properties getKafkaProperties() { Properties props = new Properties(); props.putAll(conf.streamsOptions); props.setProperty("group.id", conf.consumerGroup); props.setProperty("max.poll.records", String.valueOf(batchSize)); props.setProperty("enable.auto.commit", "true"); props.setProperty("auto.commit.interval.ms", "1000"); props.setProperty("key.deserializer", "org.apache.kafka.common.serialization.ByteArrayDeserializer"); props.setProperty("value.deserializer", "com.mapr.db.cdc.ChangeDataRecordDeserializer"); return props; }
class class_name[name] begin[{] method[getKafkaProperties, return_type[type[Properties]], modifier[private], parameter[]] begin[{] local_variable[type[Properties], props] call[props.putAll, parameter[member[conf.streamsOptions]]] call[props.setProperty, parameter[literal["group.id"], member[conf.consumerGroup]]] call[props.setProperty, parameter[literal["max.poll.records"], call[String.valueOf, parameter[member[.batchSize]]]]] call[props.setProperty, parameter[literal["enable.auto.commit"], literal["true"]]] call[props.setProperty, parameter[literal["auto.commit.interval.ms"], literal["1000"]]] call[props.setProperty, parameter[literal["key.deserializer"], literal["org.apache.kafka.common.serialization.ByteArrayDeserializer"]]] call[props.setProperty, parameter[literal["value.deserializer"], literal["com.mapr.db.cdc.ChangeDataRecordDeserializer"]]] return[member[.props]] end[}] END[}]
Keyword[private] identifier[Properties] identifier[getKafkaProperties] operator[SEP] operator[SEP] { identifier[Properties] identifier[props] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[putAll] operator[SEP] identifier[conf] operator[SEP] identifier[streamsOptions] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[setProperty] operator[SEP] literal[String] , identifier[conf] operator[SEP] identifier[consumerGroup] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[setProperty] operator[SEP] literal[String] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[batchSize] operator[SEP] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[setProperty] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[setProperty] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[setProperty] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[setProperty] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[props] operator[SEP] }
public void zrevrangeByScore(final byte[] key, final byte[] max, final byte[] min) { sendCommand(Command.ZREVRANGEBYSCORE, key, max, min); }
class class_name[name] begin[{] method[zrevrangeByScore, return_type[void], modifier[public], parameter[key, max, min]] begin[{] call[.sendCommand, parameter[member[Command.ZREVRANGEBYSCORE], member[.key], member[.max], member[.min]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[zrevrangeByScore] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[key] , Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[max] , Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[min] operator[SEP] { identifier[sendCommand] operator[SEP] identifier[Command] operator[SEP] identifier[ZREVRANGEBYSCORE] , identifier[key] , identifier[max] , identifier[min] operator[SEP] operator[SEP] }
public static UserMentionEntity createUserMentionEntity(int start, int end, String name, String screenName, long id) { return new UserMentionEntityJSONImpl(start, end, name, screenName, id); }
class class_name[name] begin[{] method[createUserMentionEntity, return_type[type[UserMentionEntity]], modifier[public static], parameter[start, end, name, screenName, id]] begin[{] return[ClassCreator(arguments=[MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=screenName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=id, 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=UserMentionEntityJSONImpl, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[UserMentionEntity] identifier[createUserMentionEntity] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[end] , identifier[String] identifier[name] , identifier[String] identifier[screenName] , Keyword[long] identifier[id] operator[SEP] { Keyword[return] Keyword[new] identifier[UserMentionEntityJSONImpl] operator[SEP] identifier[start] , identifier[end] , identifier[name] , identifier[screenName] , identifier[id] operator[SEP] operator[SEP] }
public String convertIfcSpaceHeaterTypeEnumToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
class class_name[name] begin[{] method[convertIfcSpaceHeaterTypeEnumToString, 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[convertIfcSpaceHeaterTypeEnumToString] 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] }
@NonNull private AlertDialog buildRetryAlert( @StringRes int messageTextId, @StringRes int positiveButtonTextId, @StringRes int negativeButtonTextId, final Intent intent) { return new AlertDialog.Builder(this) .setMessage(messageTextId) .setPositiveButton(positiveButtonTextId, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { load(); } }) .setNegativeButton(negativeButtonTextId, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { setResult(RESULT_CANCELED, intent); finish(); } }) .setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialog) { setResult(RESULT_CANCELED, intent); finish(); } }) .create(); }
class class_name[name] begin[{] method[buildRetryAlert, return_type[type[AlertDialog]], modifier[private], parameter[messageTextId, positiveButtonTextId, negativeButtonTextId, intent]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=messageTextId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setMessage, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=positiveButtonTextId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[], member=load, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onClick, parameters=[FormalParameter(annotations=[], modifiers=set(), name=dialog, type=ReferenceType(arguments=None, dimensions=[], name=DialogInterface, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=which, type=BasicType(dimensions=[], name=int), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DialogInterface, sub_type=ReferenceType(arguments=None, dimensions=None, name=OnClickListener, sub_type=None)))], member=setPositiveButton, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=negativeButtonTextId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=RESULT_CANCELED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=intent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=finish, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onClick, parameters=[FormalParameter(annotations=[], modifiers=set(), name=dialogInterface, type=ReferenceType(arguments=None, dimensions=[], name=DialogInterface, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=i, type=BasicType(dimensions=[], name=int), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DialogInterface, sub_type=ReferenceType(arguments=None, dimensions=None, name=OnClickListener, sub_type=None)))], member=setNegativeButton, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=RESULT_CANCELED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=intent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=finish, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onCancel, parameters=[FormalParameter(annotations=[], modifiers=set(), name=dialog, type=ReferenceType(arguments=None, dimensions=[], name=DialogInterface, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DialogInterface, sub_type=ReferenceType(arguments=None, dimensions=None, name=OnCancelListener, sub_type=None)))], member=setOnCancelListener, 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=AlertDialog, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None)))] end[}] END[}]
annotation[@] identifier[NonNull] Keyword[private] identifier[AlertDialog] identifier[buildRetryAlert] operator[SEP] annotation[@] identifier[StringRes] Keyword[int] identifier[messageTextId] , annotation[@] identifier[StringRes] Keyword[int] identifier[positiveButtonTextId] , annotation[@] identifier[StringRes] Keyword[int] identifier[negativeButtonTextId] , Keyword[final] identifier[Intent] identifier[intent] operator[SEP] { Keyword[return] Keyword[new] identifier[AlertDialog] operator[SEP] identifier[Builder] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[setMessage] operator[SEP] identifier[messageTextId] operator[SEP] operator[SEP] identifier[setPositiveButton] operator[SEP] identifier[positiveButtonTextId] , Keyword[new] identifier[DialogInterface] operator[SEP] identifier[OnClickListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onClick] operator[SEP] identifier[DialogInterface] identifier[dialog] , Keyword[int] identifier[which] operator[SEP] { identifier[load] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[setNegativeButton] operator[SEP] identifier[negativeButtonTextId] , Keyword[new] identifier[DialogInterface] operator[SEP] identifier[OnClickListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onClick] operator[SEP] identifier[DialogInterface] identifier[dialogInterface] , Keyword[int] identifier[i] operator[SEP] { identifier[setResult] operator[SEP] identifier[RESULT_CANCELED] , identifier[intent] operator[SEP] operator[SEP] identifier[finish] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[setOnCancelListener] operator[SEP] Keyword[new] identifier[DialogInterface] operator[SEP] identifier[OnCancelListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onCancel] operator[SEP] identifier[DialogInterface] identifier[dialog] operator[SEP] { identifier[setResult] operator[SEP] identifier[RESULT_CANCELED] , identifier[intent] operator[SEP] operator[SEP] identifier[finish] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] }
public static <S, I, A extends DFA<S, I> & InputAlphabetHolder<I>> CompactDFA<I> minimizeDFA(A dfa) { return minimizeDFA(dfa, PruningMode.PRUNE_AFTER); }
class class_name[name] begin[{] method[minimizeDFA, return_type[type[CompactDFA]], modifier[public static], parameter[dfa]] begin[{] return[call[.minimizeDFA, parameter[member[.dfa], member[PruningMode.PRUNE_AFTER]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[S] , identifier[I] , identifier[A] Keyword[extends] identifier[DFA] operator[<] identifier[S] , identifier[I] operator[>] operator[&] identifier[InputAlphabetHolder] operator[<] identifier[I] operator[>] operator[>] identifier[CompactDFA] operator[<] identifier[I] operator[>] identifier[minimizeDFA] operator[SEP] identifier[A] identifier[dfa] operator[SEP] { Keyword[return] identifier[minimizeDFA] operator[SEP] identifier[dfa] , identifier[PruningMode] operator[SEP] identifier[PRUNE_AFTER] operator[SEP] operator[SEP] }
public static void updateRequestAttributes(HttpServletRequest req) { // 初始化本次请求的多国语言字符串 Map<String, Map<String, Object>> msgss = getMessageSet(); if (msgss == null && !ctx().localizations.isEmpty()) msgss = ctx().localizations.values().iterator().next(); if (null != msgss) { Map<String, Object> msgs = null; String lKey = Strings.sBlank(Mvcs.getLocalizationKey(), getDefaultLocalizationKey()); if (!Strings.isBlank(lKey)) msgs = msgss.get(lKey); // 没有设定特殊的 Local 名字,随便取一个 if (null == msgs) { if (msgss.size() > 0) msgs = msgss.values().iterator().next(); } // 记录到请求中 req.setAttribute(MSG, msgs); } // 记录一些数据到请求对象中 req.setAttribute("base", req.getContextPath()); req.setAttribute("$request", req); }
class class_name[name] begin[{] method[updateRequestAttributes, return_type[void], modifier[public static], parameter[req]] begin[{] local_variable[type[Map], msgss] if[binary_operation[binary_operation[member[.msgss], ==, literal[null]], &&, call[.ctx, parameter[]]]] begin[{] assign[member[.msgss], call[.ctx, parameter[]]] else begin[{] None end[}] if[binary_operation[literal[null], !=, member[.msgss]]] begin[{] local_variable[type[Map], msgs] local_variable[type[String], lKey] if[call[Strings.isBlank, parameter[member[.lKey]]]] begin[{] assign[member[.msgs], call[msgss.get, parameter[member[.lKey]]]] else begin[{] None end[}] if[binary_operation[literal[null], ==, member[.msgs]]] begin[{] if[binary_operation[call[msgss.size, parameter[]], >, literal[0]]] begin[{] assign[member[.msgs], call[msgss.values, parameter[]]] else begin[{] None end[}] else begin[{] None end[}] call[req.setAttribute, parameter[member[.MSG], member[.msgs]]] else begin[{] None end[}] call[req.setAttribute, parameter[literal["base"], call[req.getContextPath, parameter[]]]] call[req.setAttribute, parameter[literal["$request"], member[.req]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[updateRequestAttributes] operator[SEP] identifier[HttpServletRequest] identifier[req] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] identifier[msgss] operator[=] identifier[getMessageSet] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[msgss] operator[==] Other[null] operator[&&] operator[!] identifier[ctx] operator[SEP] operator[SEP] operator[SEP] identifier[localizations] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] identifier[msgss] operator[=] identifier[ctx] operator[SEP] operator[SEP] operator[SEP] identifier[localizations] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[msgss] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[msgs] operator[=] Other[null] operator[SEP] identifier[String] identifier[lKey] operator[=] identifier[Strings] operator[SEP] identifier[sBlank] operator[SEP] identifier[Mvcs] operator[SEP] identifier[getLocalizationKey] operator[SEP] operator[SEP] , identifier[getDefaultLocalizationKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Strings] operator[SEP] identifier[isBlank] operator[SEP] identifier[lKey] operator[SEP] operator[SEP] identifier[msgs] operator[=] identifier[msgss] operator[SEP] identifier[get] operator[SEP] identifier[lKey] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[msgs] operator[SEP] { Keyword[if] operator[SEP] identifier[msgss] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] identifier[msgs] operator[=] identifier[msgss] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] } identifier[req] operator[SEP] identifier[setAttribute] operator[SEP] identifier[MSG] , identifier[msgs] operator[SEP] operator[SEP] } identifier[req] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[req] operator[SEP] identifier[getContextPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[req] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[req] operator[SEP] operator[SEP] }
@Override public String[] getClientAliases(String keyType, Principal[] issuers) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.entry(tc, "getClientAliases", new Object[] { keyType, issuers }); String[] rc = getX509KeyManager().getClientAliases(keyType, issuers); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.exit(tc, "getClientAliases", rc); return rc; }
class class_name[name] begin[{] method[getClientAliases, return_type[type[String]], modifier[public], parameter[keyType, issuers]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["getClientAliases"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=keyType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=issuers, 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[}] local_variable[type[String], rc] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["getClientAliases"], member[.rc]]] else begin[{] None end[}] return[member[.rc]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[getClientAliases] operator[SEP] identifier[String] identifier[keyType] , identifier[Principal] operator[SEP] operator[SEP] identifier[issuers] 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[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[keyType] , identifier[issuers] } operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[rc] operator[=] identifier[getX509KeyManager] operator[SEP] operator[SEP] operator[SEP] identifier[getClientAliases] operator[SEP] identifier[keyType] , identifier[issuers] 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[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[rc] operator[SEP] operator[SEP] Keyword[return] identifier[rc] operator[SEP] }
@SuppressWarnings("unchecked") static public <T> T loadByReflection(String className, Object ... arguments) { try{ return (T) new MetaClass(className).createInstance(arguments); } catch(Exception e){ throw new ReflectionLoadingException(e); } }
class class_name[name] begin[{] method[loadByReflection, return_type[type[T]], modifier[public static], parameter[className, arguments]] begin[{] TryStatement(block=[ReturnStatement(expression=Cast(expression=ClassCreator(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=arguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=MetaClass, sub_type=None)), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ReflectionLoadingException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[static] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[loadByReflection] operator[SEP] identifier[String] identifier[className] , identifier[Object] operator[...] identifier[arguments] operator[SEP] { Keyword[try] { Keyword[return] operator[SEP] identifier[T] operator[SEP] Keyword[new] identifier[MetaClass] operator[SEP] identifier[className] operator[SEP] operator[SEP] identifier[createInstance] operator[SEP] identifier[arguments] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ReflectionLoadingException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
protected String getRequestString(List<CmsResource> resources) { String res = "?"; for (CmsResource resource : resources) { res += "resources=" + resource.getStructureId().getStringValue() + "&"; } return res.substring(0, res.length() - 1); //Remove last "&" }
class class_name[name] begin[{] method[getRequestString, return_type[type[String]], modifier[protected], parameter[resources]] begin[{] local_variable[type[String], res] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="resources="), operandr=MethodInvocation(arguments=[], member=getStructureId, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[MethodInvocation(arguments=[], member=getStringValue, 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="&"), operator=+)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=resource)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsResource, sub_type=None))), label=None) return[call[res.substring, parameter[literal[0], binary_operation[call[res.length, parameter[]], -, literal[1]]]]] end[}] END[}]
Keyword[protected] identifier[String] identifier[getRequestString] operator[SEP] identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[resources] operator[SEP] { identifier[String] identifier[res] operator[=] literal[String] operator[SEP] Keyword[for] operator[SEP] identifier[CmsResource] identifier[resource] operator[:] identifier[resources] operator[SEP] { identifier[res] operator[+=] literal[String] operator[+] identifier[resource] operator[SEP] identifier[getStructureId] operator[SEP] operator[SEP] operator[SEP] identifier[getStringValue] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] } Keyword[return] identifier[res] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[res] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] }
public static SocketFactory getSocketFactoryFromProperty( Configuration conf, String propValue) { try { Class<?> theClass = conf.getClassByName(propValue); return (SocketFactory) ReflectionUtils.newInstance(theClass, conf); } catch (ClassNotFoundException cnfe) { throw new RuntimeException("Socket Factory class not found: " + cnfe); } }
class class_name[name] begin[{] method[getSocketFactoryFromProperty, return_type[type[SocketFactory]], modifier[public static], parameter[conf, propValue]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=propValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getClassByName, postfix_operators=[], prefix_operators=[], qualifier=conf, selectors=[], type_arguments=None), name=theClass)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[MemberReference(member=theClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=conf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=ReflectionUtils, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=SocketFactory, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Socket Factory class not found: "), operandr=MemberReference(member=cnfe, 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=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=cnfe, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[SocketFactory] identifier[getSocketFactoryFromProperty] operator[SEP] identifier[Configuration] identifier[conf] , identifier[String] identifier[propValue] operator[SEP] { Keyword[try] { identifier[Class] operator[<] operator[?] operator[>] identifier[theClass] operator[=] identifier[conf] operator[SEP] identifier[getClassByName] operator[SEP] identifier[propValue] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[SocketFactory] operator[SEP] identifier[ReflectionUtils] operator[SEP] identifier[newInstance] operator[SEP] identifier[theClass] , identifier[conf] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[cnfe] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[cnfe] operator[SEP] operator[SEP] } }
private void processRangeOptions(final Map<String, String> properties) { final String featuresRange = properties.get("range"); final String[] rangeArray = Flags .processLemmaBaselineFeaturesRange(featuresRange); if (rangeArray[0].equalsIgnoreCase("pos")) { this.isPos = true; } if (rangeArray[1].equalsIgnoreCase("posclass")) { this.isPosClass = true; } this.attributes = properties; }
class class_name[name] begin[{] method[processRangeOptions, return_type[void], modifier[private], parameter[properties]] begin[{] local_variable[type[String], featuresRange] local_variable[type[String], rangeArray] if[member[.rangeArray]] begin[{] assign[THIS[member[None.isPos]], literal[true]] else begin[{] None end[}] if[member[.rangeArray]] begin[{] assign[THIS[member[None.isPosClass]], literal[true]] else begin[{] None end[}] assign[THIS[member[None.attributes]], member[.properties]] end[}] END[}]
Keyword[private] Keyword[void] identifier[processRangeOptions] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[properties] operator[SEP] { Keyword[final] identifier[String] identifier[featuresRange] operator[=] identifier[properties] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[rangeArray] operator[=] identifier[Flags] operator[SEP] identifier[processLemmaBaselineFeaturesRange] operator[SEP] identifier[featuresRange] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rangeArray] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[isPos] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[rangeArray] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[isPosClass] operator[=] literal[boolean] operator[SEP] } Keyword[this] operator[SEP] identifier[attributes] operator[=] identifier[properties] operator[SEP] }
@Override public void addDeploymentGroup(final DeploymentGroup deploymentGroup) throws DeploymentGroupExistsException { log.info("adding deployment-group: {}", deploymentGroup); final ZooKeeperClient client = provider.get("addDeploymentGroup"); try { try { client.ensurePath(Paths.configDeploymentGroups()); client.ensurePath(Paths.statusDeploymentGroups()); client.transaction( create(Paths.configDeploymentGroup(deploymentGroup.getName()), deploymentGroup), create(Paths.statusDeploymentGroup(deploymentGroup.getName())), create(Paths.statusDeploymentGroupHosts(deploymentGroup.getName()), Json.asBytesUnchecked(emptyList())), create(Paths.statusDeploymentGroupRemovedHosts(deploymentGroup.getName()), Json.asBytesUnchecked(emptyList())) ); } catch (final NodeExistsException e) { throw new DeploymentGroupExistsException(deploymentGroup.getName()); } } catch (final KeeperException e) { throw new HeliosRuntimeException("adding deployment-group " + deploymentGroup + " failed", e); } }
class class_name[name] begin[{] method[addDeploymentGroup, return_type[void], modifier[public], parameter[deploymentGroup]] begin[{] call[log.info, parameter[literal["adding deployment-group: {}"], member[.deploymentGroup]]] local_variable[type[ZooKeeperClient], client] TryStatement(block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=configDeploymentGroups, postfix_operators=[], prefix_operators=[], qualifier=Paths, selectors=[], type_arguments=None)], member=ensurePath, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=statusDeploymentGroups, postfix_operators=[], prefix_operators=[], qualifier=Paths, selectors=[], type_arguments=None)], member=ensurePath, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=deploymentGroup, selectors=[], type_arguments=None)], member=configDeploymentGroup, postfix_operators=[], prefix_operators=[], qualifier=Paths, selectors=[], type_arguments=None), MemberReference(member=deploymentGroup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=create, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=deploymentGroup, selectors=[], type_arguments=None)], member=statusDeploymentGroup, postfix_operators=[], prefix_operators=[], qualifier=Paths, selectors=[], type_arguments=None)], member=create, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=deploymentGroup, selectors=[], type_arguments=None)], member=statusDeploymentGroupHosts, postfix_operators=[], prefix_operators=[], qualifier=Paths, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=emptyList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=asBytesUnchecked, postfix_operators=[], prefix_operators=[], qualifier=Json, selectors=[], type_arguments=None)], member=create, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=deploymentGroup, selectors=[], type_arguments=None)], member=statusDeploymentGroupRemovedHosts, postfix_operators=[], prefix_operators=[], qualifier=Paths, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=emptyList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=asBytesUnchecked, postfix_operators=[], prefix_operators=[], qualifier=Json, selectors=[], type_arguments=None)], member=create, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=transaction, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=deploymentGroup, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DeploymentGroupExistsException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NodeExistsException']))], finally_block=None, label=None, resources=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="adding deployment-group "), operandr=MemberReference(member=deploymentGroup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" failed"), 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=HeliosRuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['KeeperException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[addDeploymentGroup] operator[SEP] Keyword[final] identifier[DeploymentGroup] identifier[deploymentGroup] operator[SEP] Keyword[throws] identifier[DeploymentGroupExistsException] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[deploymentGroup] operator[SEP] operator[SEP] Keyword[final] identifier[ZooKeeperClient] identifier[client] operator[=] identifier[provider] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { Keyword[try] { identifier[client] operator[SEP] identifier[ensurePath] operator[SEP] identifier[Paths] operator[SEP] identifier[configDeploymentGroups] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[client] operator[SEP] identifier[ensurePath] operator[SEP] identifier[Paths] operator[SEP] identifier[statusDeploymentGroups] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[client] operator[SEP] identifier[transaction] operator[SEP] identifier[create] operator[SEP] identifier[Paths] operator[SEP] identifier[configDeploymentGroup] operator[SEP] identifier[deploymentGroup] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] , identifier[deploymentGroup] operator[SEP] , identifier[create] operator[SEP] identifier[Paths] operator[SEP] identifier[statusDeploymentGroup] operator[SEP] identifier[deploymentGroup] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] , identifier[create] operator[SEP] identifier[Paths] operator[SEP] identifier[statusDeploymentGroupHosts] operator[SEP] identifier[deploymentGroup] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] , identifier[Json] operator[SEP] identifier[asBytesUnchecked] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] , identifier[create] operator[SEP] identifier[Paths] operator[SEP] identifier[statusDeploymentGroupRemovedHosts] operator[SEP] identifier[deploymentGroup] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] , identifier[Json] operator[SEP] identifier[asBytesUnchecked] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[NodeExistsException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[DeploymentGroupExistsException] operator[SEP] identifier[deploymentGroup] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[KeeperException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[HeliosRuntimeException] operator[SEP] literal[String] operator[+] identifier[deploymentGroup] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public static PactDslRootValue timestamp(String format) { PactDslRootValue value = new PactDslRootValue(); value.generators.addGenerator(Category.BODY, "", new DateTimeGenerator(format)); FastDateFormat instance = FastDateFormat.getInstance(format); value.setValue(instance.format(new Date(DATE_2000))); value.setMatcher(value.matchTimestamp(format)); return value; }
class class_name[name] begin[{] method[timestamp, return_type[type[PactDslRootValue]], modifier[public static], parameter[format]] begin[{] local_variable[type[PactDslRootValue], value] call[value.generators.addGenerator, parameter[member[Category.BODY], literal[""], ClassCreator(arguments=[MemberReference(member=format, 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=DateTimeGenerator, sub_type=None))]] local_variable[type[FastDateFormat], instance] call[value.setValue, parameter[call[instance.format, parameter[ClassCreator(arguments=[MemberReference(member=DATE_2000, 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=Date, sub_type=None))]]]] call[value.setMatcher, parameter[call[value.matchTimestamp, parameter[member[.format]]]]] return[member[.value]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PactDslRootValue] identifier[timestamp] operator[SEP] identifier[String] identifier[format] operator[SEP] { identifier[PactDslRootValue] identifier[value] operator[=] Keyword[new] identifier[PactDslRootValue] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[generators] operator[SEP] identifier[addGenerator] operator[SEP] identifier[Category] operator[SEP] identifier[BODY] , literal[String] , Keyword[new] identifier[DateTimeGenerator] operator[SEP] identifier[format] operator[SEP] operator[SEP] operator[SEP] identifier[FastDateFormat] identifier[instance] operator[=] identifier[FastDateFormat] operator[SEP] identifier[getInstance] operator[SEP] identifier[format] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[setValue] operator[SEP] identifier[instance] operator[SEP] identifier[format] operator[SEP] Keyword[new] identifier[Date] operator[SEP] identifier[DATE_2000] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[setMatcher] operator[SEP] identifier[value] operator[SEP] identifier[matchTimestamp] operator[SEP] identifier[format] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[value] operator[SEP] }
public DateTime toDateTime(ReadableInstant baseInstant) { Chronology chrono = DateTimeUtils.getInstantChronology(baseInstant); long instantMillis = DateTimeUtils.getInstantMillis(baseInstant); long resolved = chrono.set(this, instantMillis); return new DateTime(resolved, chrono); }
class class_name[name] begin[{] method[toDateTime, return_type[type[DateTime]], modifier[public], parameter[baseInstant]] begin[{] local_variable[type[Chronology], chrono] local_variable[type[long], instantMillis] local_variable[type[long], resolved] return[ClassCreator(arguments=[MemberReference(member=resolved, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=chrono, 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=DateTime, sub_type=None))] end[}] END[}]
Keyword[public] identifier[DateTime] identifier[toDateTime] operator[SEP] identifier[ReadableInstant] identifier[baseInstant] operator[SEP] { identifier[Chronology] identifier[chrono] operator[=] identifier[DateTimeUtils] operator[SEP] identifier[getInstantChronology] operator[SEP] identifier[baseInstant] operator[SEP] operator[SEP] Keyword[long] identifier[instantMillis] operator[=] identifier[DateTimeUtils] operator[SEP] identifier[getInstantMillis] operator[SEP] identifier[baseInstant] operator[SEP] operator[SEP] Keyword[long] identifier[resolved] operator[=] identifier[chrono] operator[SEP] identifier[set] operator[SEP] Keyword[this] , identifier[instantMillis] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[DateTime] operator[SEP] identifier[resolved] , identifier[chrono] operator[SEP] operator[SEP] }
public static vpnclientlessaccessprofile[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{ vpnclientlessaccessprofile obj = new vpnclientlessaccessprofile(); options option = new options(); option.set_filter(filter); vpnclientlessaccessprofile[] response = (vpnclientlessaccessprofile[]) obj.getfiltered(service, option); return response; }
class class_name[name] begin[{] method[get_filtered, return_type[type[vpnclientlessaccessprofile]], modifier[public static], parameter[service, filter]] begin[{] local_variable[type[vpnclientlessaccessprofile], obj] local_variable[type[options], option] call[option.set_filter, parameter[member[.filter]]] local_variable[type[vpnclientlessaccessprofile], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[vpnclientlessaccessprofile] operator[SEP] operator[SEP] identifier[get_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[filtervalue] operator[SEP] operator[SEP] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] { identifier[vpnclientlessaccessprofile] identifier[obj] operator[=] Keyword[new] identifier[vpnclientlessaccessprofile] operator[SEP] operator[SEP] operator[SEP] identifier[options] identifier[option] operator[=] Keyword[new] identifier[options] operator[SEP] operator[SEP] operator[SEP] identifier[option] operator[SEP] identifier[set_filter] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[vpnclientlessaccessprofile] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[vpnclientlessaccessprofile] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[getfiltered] operator[SEP] identifier[service] , identifier[option] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public boolean isValid(HttpServletRequest request, CaptchaRequest captcha) { String challenge = captcha.getRecaptcha_challenge_field(); String response = captcha.getRecaptcha_response_field(); return isValid(request, challenge, response); }
class class_name[name] begin[{] method[isValid, return_type[type[boolean]], modifier[public], parameter[request, captcha]] begin[{] local_variable[type[String], challenge] local_variable[type[String], response] return[call[.isValid, parameter[member[.request], member[.challenge], member[.response]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isValid] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[CaptchaRequest] identifier[captcha] operator[SEP] { identifier[String] identifier[challenge] operator[=] identifier[captcha] operator[SEP] identifier[getRecaptcha_challenge_field] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[response] operator[=] identifier[captcha] operator[SEP] identifier[getRecaptcha_response_field] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[isValid] operator[SEP] identifier[request] , identifier[challenge] , identifier[response] operator[SEP] operator[SEP] }
public static BufferedImage getSubImage(BufferedImage image, int x, int y, int width, int height) { int type = (image.getTransparency() == Transparency.OPAQUE) ? BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB; BufferedImage tmp = new BufferedImage(width, height, type); Graphics2D g2 = tmp.createGraphics(); g2.drawImage(image.getSubimage(x, y, width, height), 0, 0, null); g2.dispose(); return tmp; }
class class_name[name] begin[{] method[getSubImage, return_type[type[BufferedImage]], modifier[public static], parameter[image, x, y, width, height]] begin[{] local_variable[type[int], type] local_variable[type[BufferedImage], tmp] local_variable[type[Graphics2D], g2] call[g2.drawImage, parameter[call[image.getSubimage, parameter[member[.x], member[.y], member[.width], member[.height]]], literal[0], literal[0], literal[null]]] call[g2.dispose, parameter[]] return[member[.tmp]] end[}] END[}]
Keyword[public] Keyword[static] identifier[BufferedImage] identifier[getSubImage] operator[SEP] identifier[BufferedImage] identifier[image] , Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] { Keyword[int] identifier[type] operator[=] operator[SEP] identifier[image] operator[SEP] identifier[getTransparency] operator[SEP] operator[SEP] operator[==] identifier[Transparency] operator[SEP] identifier[OPAQUE] operator[SEP] operator[?] identifier[BufferedImage] operator[SEP] identifier[TYPE_INT_RGB] operator[:] identifier[BufferedImage] operator[SEP] identifier[TYPE_INT_ARGB] operator[SEP] identifier[BufferedImage] identifier[tmp] operator[=] Keyword[new] identifier[BufferedImage] operator[SEP] identifier[width] , identifier[height] , identifier[type] operator[SEP] operator[SEP] identifier[Graphics2D] identifier[g2] operator[=] identifier[tmp] operator[SEP] identifier[createGraphics] operator[SEP] operator[SEP] operator[SEP] identifier[g2] operator[SEP] identifier[drawImage] operator[SEP] identifier[image] operator[SEP] identifier[getSubimage] operator[SEP] identifier[x] , identifier[y] , identifier[width] , identifier[height] operator[SEP] , Other[0] , Other[0] , Other[null] operator[SEP] operator[SEP] identifier[g2] operator[SEP] identifier[dispose] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[tmp] operator[SEP] }
public MatchResponse merge(MatchResponse matchResponse) { if (matchResponse == null || matchResponse == this) { return this; } else { boolean mergedSSLRequired = mergeSSLRequired(matchResponse.isSSLRequired()); boolean mergedAccessPrecluded = mergeAccessPrecluded(matchResponse.isAccessPrecluded()); List<String> mergedRoles = mergeRoles(matchResponse.getRoles(), mergedAccessPrecluded); return new MatchResponse(mergedRoles, mergedSSLRequired, mergedAccessPrecluded); } }
class class_name[name] begin[{] method[merge, return_type[type[MatchResponse]], modifier[public], parameter[matchResponse]] begin[{] if[binary_operation[binary_operation[member[.matchResponse], ==, literal[null]], ||, binary_operation[member[.matchResponse], ==, THIS[]]]] begin[{] return[THIS[]] else begin[{] local_variable[type[boolean], mergedSSLRequired] local_variable[type[boolean], mergedAccessPrecluded] local_variable[type[List], mergedRoles] return[ClassCreator(arguments=[MemberReference(member=mergedRoles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mergedSSLRequired, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mergedAccessPrecluded, 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=MatchResponse, sub_type=None))] end[}] end[}] END[}]
Keyword[public] identifier[MatchResponse] identifier[merge] operator[SEP] identifier[MatchResponse] identifier[matchResponse] operator[SEP] { Keyword[if] operator[SEP] identifier[matchResponse] operator[==] Other[null] operator[||] identifier[matchResponse] operator[==] Keyword[this] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] } Keyword[else] { Keyword[boolean] identifier[mergedSSLRequired] operator[=] identifier[mergeSSLRequired] operator[SEP] identifier[matchResponse] operator[SEP] identifier[isSSLRequired] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[mergedAccessPrecluded] operator[=] identifier[mergeAccessPrecluded] operator[SEP] identifier[matchResponse] operator[SEP] identifier[isAccessPrecluded] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[mergedRoles] operator[=] identifier[mergeRoles] operator[SEP] identifier[matchResponse] operator[SEP] identifier[getRoles] operator[SEP] operator[SEP] , identifier[mergedAccessPrecluded] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[MatchResponse] operator[SEP] identifier[mergedRoles] , identifier[mergedSSLRequired] , identifier[mergedAccessPrecluded] operator[SEP] operator[SEP] } }
private List loadRecentList() { try { InputStream in = new BufferedInputStream(new FileInputStream( RECENT_FILE_NAME)); XMLDecoder d = new XMLDecoder(in); Object result = d.readObject(); d.close(); return (List) result; } catch (FileNotFoundException ex) { // This is ok, it's probably the first time the picker has been used. return new ArrayList(); } }
class class_name[name] begin[{] method[loadRecentList, return_type[type[List]], modifier[private], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=RECENT_FILE_NAME, 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=FileInputStream, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedInputStream, sub_type=None)), name=in)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=in, 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=XMLDecoder, sub_type=None)), name=d)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XMLDecoder, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readObject, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Cast(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=List, sub_type=None)), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArrayList, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['FileNotFoundException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] identifier[List] identifier[loadRecentList] operator[SEP] operator[SEP] { Keyword[try] { identifier[InputStream] identifier[in] operator[=] Keyword[new] identifier[BufferedInputStream] operator[SEP] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[RECENT_FILE_NAME] operator[SEP] operator[SEP] operator[SEP] identifier[XMLDecoder] identifier[d] operator[=] Keyword[new] identifier[XMLDecoder] operator[SEP] identifier[in] operator[SEP] operator[SEP] identifier[Object] identifier[result] operator[=] identifier[d] operator[SEP] identifier[readObject] operator[SEP] operator[SEP] operator[SEP] identifier[d] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[List] operator[SEP] identifier[result] operator[SEP] } Keyword[catch] operator[SEP] identifier[FileNotFoundException] identifier[ex] operator[SEP] { Keyword[return] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] } }
public <T> WithStaticFinder<T> withFinder(Class<T> beanType) { return withStaticFinders.withFinder(beanType); }
class class_name[name] begin[{] method[withFinder, return_type[type[WithStaticFinder]], modifier[public], parameter[beanType]] begin[{] return[call[withStaticFinders.withFinder, parameter[member[.beanType]]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[WithStaticFinder] operator[<] identifier[T] operator[>] identifier[withFinder] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[beanType] operator[SEP] { Keyword[return] identifier[withStaticFinders] operator[SEP] identifier[withFinder] operator[SEP] identifier[beanType] operator[SEP] operator[SEP] }
public Object inquireByOid(Oid oid) throws GSSException { if (oid == null) { throw new GlobusGSSException(GSSException.FAILURE, GlobusGSSException.BAD_ARGUMENT, "nullOption"); } if (oid.equals(GSSConstants.X509_CERT_CHAIN)) { if (isEstablished()) { // converting certs is slower but keeping coverted certs // takes lots of memory. try { /*DEL Vector peerCerts = this.conn.getCertificateChain(); */ Certificate[] peerCerts; try { peerCerts = this.sslEngine.getSession().getPeerCertificates(); } catch (SSLPeerUnverifiedException e) { peerCerts = null; } if (peerCerts != null && peerCerts.length > 0) { /*DEL return PureTLSUtil.certificateChainToArray(peerCerts); */ return (X509Certificate[])peerCerts; } else { return null; } } catch (Exception e) { throw new GlobusGSSException( GSSException.DEFECTIVE_CREDENTIAL, e ); } } } else if (oid.equals(GSSConstants.RECEIVED_LIMITED_PROXY)) { return this.peerLimited; } return null; }
class class_name[name] begin[{] method[inquireByOid, return_type[type[Object]], modifier[public], parameter[oid]] begin[{] if[binary_operation[member[.oid], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=FAILURE, postfix_operators=[], prefix_operators=[], qualifier=GSSException, selectors=[]), MemberReference(member=BAD_ARGUMENT, postfix_operators=[], prefix_operators=[], qualifier=GlobusGSSException, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="nullOption")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GlobusGSSException, sub_type=None)), label=None) else begin[{] None end[}] if[call[oid.equals, parameter[member[GSSConstants.X509_CERT_CHAIN]]]] begin[{] if[call[.isEstablished, parameter[]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=peerCerts)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Certificate, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=peerCerts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=sslEngine, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getSession, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getPeerCertificates, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=peerCerts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SSLPeerUnverifiedException']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=peerCerts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=peerCerts, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Cast(expression=MemberReference(member=peerCerts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[None], name=X509Certificate, sub_type=None)), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=DEFECTIVE_CREDENTIAL, postfix_operators=[], prefix_operators=[], qualifier=GSSException, selectors=[]), 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=GlobusGSSException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] else begin[{] if[call[oid.equals, parameter[member[GSSConstants.RECEIVED_LIMITED_PROXY]]]] begin[{] return[THIS[member[None.peerLimited]]] else begin[{] None end[}] end[}] return[literal[null]] end[}] END[}]
Keyword[public] identifier[Object] identifier[inquireByOid] operator[SEP] identifier[Oid] identifier[oid] operator[SEP] Keyword[throws] identifier[GSSException] { Keyword[if] operator[SEP] identifier[oid] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[GlobusGSSException] operator[SEP] identifier[GSSException] operator[SEP] identifier[FAILURE] , identifier[GlobusGSSException] operator[SEP] identifier[BAD_ARGUMENT] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[oid] operator[SEP] identifier[equals] operator[SEP] identifier[GSSConstants] operator[SEP] identifier[X509_CERT_CHAIN] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isEstablished] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[Certificate] operator[SEP] operator[SEP] identifier[peerCerts] operator[SEP] Keyword[try] { identifier[peerCerts] operator[=] Keyword[this] operator[SEP] identifier[sslEngine] operator[SEP] identifier[getSession] operator[SEP] operator[SEP] operator[SEP] identifier[getPeerCertificates] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SSLPeerUnverifiedException] identifier[e] operator[SEP] { identifier[peerCerts] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[peerCerts] operator[!=] Other[null] operator[&&] identifier[peerCerts] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { Keyword[return] operator[SEP] identifier[X509Certificate] operator[SEP] operator[SEP] operator[SEP] identifier[peerCerts] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[GlobusGSSException] operator[SEP] identifier[GSSException] operator[SEP] identifier[DEFECTIVE_CREDENTIAL] , identifier[e] operator[SEP] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] identifier[oid] operator[SEP] identifier[equals] operator[SEP] identifier[GSSConstants] operator[SEP] identifier[RECEIVED_LIMITED_PROXY] operator[SEP] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] identifier[peerLimited] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
private final void step1(boolean y) { if (b[k] == 's') { if (endWith("sses")) { k -= 2; } else if (endWith("ies")) { if (y && k-3 >= 0 && isConsonant(k-3)) { setto("y"); } else { setto("i"); } } else if (b[k - 1] != 's') { k--; } } if (endWith("eed")) { if (m() > 0) { k--; } } else if ((endWith("ed") || endWith("ing")) && vowelinstem()) { k = j; if (endWith("at")) { setto("ate"); } else if (endWith("bl")) { setto("ble"); } else if (endWith("iz")) { setto("ize"); } else if (y && endWith("i") && k-1 >= 0 && isConsonant(k-1)) { setto("y"); } else if (doublec(k)) { k--; { int ch = b[k]; if (ch == 'l' || ch == 's' || ch == 'z') { k++; } } } else if (m() == 1 && cvc(k)) { setto("e"); } } }
class class_name[name] begin[{] method[step1, return_type[void], modifier[final private], parameter[y]] begin[{] if[binary_operation[member[.b], ==, literal['s']]] begin[{] if[call[.endWith, parameter[literal["sses"]]]] begin[{] assign[member[.k], literal[2]] else begin[{] if[call[.endWith, parameter[literal["ies"]]]] begin[{] if[binary_operation[binary_operation[member[.y], &&, binary_operation[binary_operation[member[.k], -, literal[3]], >=, literal[0]]], &&, call[.isConsonant, parameter[binary_operation[member[.k], -, literal[3]]]]]] begin[{] call[.setto, parameter[literal["y"]]] else begin[{] call[.setto, parameter[literal["i"]]] end[}] else begin[{] if[binary_operation[member[.b], !=, literal['s']]] begin[{] member[.k] else begin[{] None end[}] end[}] end[}] else begin[{] None end[}] if[call[.endWith, parameter[literal["eed"]]]] begin[{] if[binary_operation[call[.m, parameter[]], >, literal[0]]] begin[{] member[.k] else begin[{] None end[}] else begin[{] if[binary_operation[binary_operation[call[.endWith, parameter[literal["ed"]]], ||, call[.endWith, parameter[literal["ing"]]]], &&, call[.vowelinstem, parameter[]]]] begin[{] assign[member[.k], member[.j]] if[call[.endWith, parameter[literal["at"]]]] begin[{] call[.setto, parameter[literal["ate"]]] else begin[{] if[call[.endWith, parameter[literal["bl"]]]] begin[{] call[.setto, parameter[literal["ble"]]] else begin[{] if[call[.endWith, parameter[literal["iz"]]]] begin[{] call[.setto, parameter[literal["ize"]]] else begin[{] if[binary_operation[binary_operation[binary_operation[member[.y], &&, call[.endWith, parameter[literal["i"]]]], &&, binary_operation[binary_operation[member[.k], -, literal[1]], >=, literal[0]]], &&, call[.isConsonant, parameter[binary_operation[member[.k], -, literal[1]]]]]] begin[{] call[.setto, parameter[literal["y"]]] else begin[{] if[call[.doublec, parameter[member[.k]]]] begin[{] member[.k] local_variable[type[int], ch] if[binary_operation[binary_operation[binary_operation[member[.ch], ==, literal['l']], ||, binary_operation[member[.ch], ==, literal['s']]], ||, binary_operation[member[.ch], ==, literal['z']]]] begin[{] member[.k] else begin[{] None end[}] else begin[{] if[binary_operation[binary_operation[call[.m, parameter[]], ==, literal[1]], &&, call[.cvc, parameter[member[.k]]]]] begin[{] call[.setto, parameter[literal["e"]]] else begin[{] None end[}] end[}] end[}] end[}] end[}] end[}] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[private] Keyword[final] Keyword[void] identifier[step1] operator[SEP] Keyword[boolean] identifier[y] operator[SEP] { Keyword[if] operator[SEP] identifier[b] operator[SEP] identifier[k] operator[SEP] operator[==] literal[String] operator[SEP] { Keyword[if] operator[SEP] identifier[endWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[k] operator[-=] Other[2] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[endWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[y] operator[&&] identifier[k] operator[-] Other[3] operator[>=] Other[0] operator[&&] identifier[isConsonant] operator[SEP] identifier[k] operator[-] Other[3] operator[SEP] operator[SEP] { identifier[setto] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[setto] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[b] operator[SEP] identifier[k] operator[-] Other[1] operator[SEP] operator[!=] literal[String] operator[SEP] { identifier[k] operator[--] operator[SEP] } } Keyword[if] operator[SEP] identifier[endWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[m] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[k] operator[--] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[endWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[endWith] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[&&] identifier[vowelinstem] operator[SEP] operator[SEP] operator[SEP] { identifier[k] operator[=] identifier[j] operator[SEP] Keyword[if] operator[SEP] identifier[endWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[setto] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[endWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[setto] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[endWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[setto] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[y] operator[&&] identifier[endWith] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[k] operator[-] Other[1] operator[>=] Other[0] operator[&&] identifier[isConsonant] operator[SEP] identifier[k] operator[-] Other[1] operator[SEP] operator[SEP] { identifier[setto] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[doublec] operator[SEP] identifier[k] operator[SEP] operator[SEP] { identifier[k] operator[--] operator[SEP] { Keyword[int] identifier[ch] operator[=] identifier[b] operator[SEP] identifier[k] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ch] operator[==] literal[String] operator[||] identifier[ch] operator[==] literal[String] operator[||] identifier[ch] operator[==] literal[String] operator[SEP] { identifier[k] operator[++] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] identifier[m] operator[SEP] operator[SEP] operator[==] Other[1] operator[&&] identifier[cvc] operator[SEP] identifier[k] operator[SEP] operator[SEP] { identifier[setto] operator[SEP] literal[String] operator[SEP] operator[SEP] } } }
public JSONObject updateRoomMetadata(String company, String roomId, HashMap<String, String> params) throws JSONException { return oClient.put("/messages/v3/" + company + "/rooms/" + roomId, params); }
class class_name[name] begin[{] method[updateRoomMetadata, return_type[type[JSONObject]], modifier[public], parameter[company, roomId, params]] begin[{] return[call[oClient.put, parameter[binary_operation[binary_operation[binary_operation[literal["/messages/v3/"], +, member[.company]], +, literal["/rooms/"]], +, member[.roomId]], member[.params]]]] end[}] END[}]
Keyword[public] identifier[JSONObject] identifier[updateRoomMetadata] operator[SEP] identifier[String] identifier[company] , identifier[String] identifier[roomId] , identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] operator[SEP] Keyword[throws] identifier[JSONException] { Keyword[return] identifier[oClient] operator[SEP] identifier[put] operator[SEP] literal[String] operator[+] identifier[company] operator[+] literal[String] operator[+] identifier[roomId] , identifier[params] operator[SEP] operator[SEP] }
public static LocalDate parse(String date) { if (StringUtils.isEmpty(date)) return null; try { return parse_(date); } catch (DateTimeParseException x) { return InvalidValues.createInvalidLocalDate(date); } }
class class_name[name] begin[{] method[parse, return_type[type[LocalDate]], modifier[public static], parameter[date]] begin[{] if[call[StringUtils.isEmpty, parameter[member[.date]]]] begin[{] return[literal[null]] else begin[{] None end[}] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=date, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=date, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createInvalidLocalDate, postfix_operators=[], prefix_operators=[], qualifier=InvalidValues, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=x, types=['DateTimeParseException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[LocalDate] identifier[parse] operator[SEP] identifier[String] identifier[date] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[date] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[try] { Keyword[return] identifier[parse_] operator[SEP] identifier[date] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[DateTimeParseException] identifier[x] operator[SEP] { Keyword[return] identifier[InvalidValues] operator[SEP] identifier[createInvalidLocalDate] operator[SEP] identifier[date] operator[SEP] operator[SEP] } }
public static Object resolveWrapperProxy(EJSLocalWrapperProxy proxy) { WrapperProxyState state = proxy.ivState; Object wrapper = state.ivWrapper; if (wrapper == null) { do { state = state.reconnect(); wrapper = state.ivWrapper; } while (wrapper == null); proxy.ivState = state; } else { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "resolveWrapperProxy: " + state); } return wrapper; }
class class_name[name] begin[{] method[resolveWrapperProxy, return_type[type[Object]], modifier[public static], parameter[proxy]] begin[{] local_variable[type[WrapperProxyState], state] local_variable[type[Object], wrapper] if[binary_operation[member[.wrapper], ==, literal[null]]] begin[{] do[binary_operation[member[.wrapper], ==, literal[null]]] begin[{] assign[member[.state], call[state.reconnect, parameter[]]] assign[member[.wrapper], member[state.ivWrapper]] end[}] assign[member[proxy.ivState], member[.state]] else begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["resolveWrapperProxy: "], +, member[.state]]]] else begin[{] None end[}] end[}] return[member[.wrapper]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[resolveWrapperProxy] operator[SEP] identifier[EJSLocalWrapperProxy] identifier[proxy] operator[SEP] { identifier[WrapperProxyState] identifier[state] operator[=] identifier[proxy] operator[SEP] identifier[ivState] operator[SEP] identifier[Object] identifier[wrapper] operator[=] identifier[state] operator[SEP] identifier[ivWrapper] operator[SEP] Keyword[if] operator[SEP] identifier[wrapper] operator[==] Other[null] operator[SEP] { Keyword[do] { identifier[state] operator[=] identifier[state] operator[SEP] identifier[reconnect] operator[SEP] operator[SEP] operator[SEP] identifier[wrapper] operator[=] identifier[state] operator[SEP] identifier[ivWrapper] operator[SEP] } Keyword[while] operator[SEP] identifier[wrapper] operator[==] Other[null] operator[SEP] operator[SEP] identifier[proxy] operator[SEP] identifier[ivState] operator[=] identifier[state] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[state] operator[SEP] operator[SEP] } Keyword[return] identifier[wrapper] operator[SEP] }
@GwtIncompatible // NavigableMap public static <K, V1, V2> NavigableMap<K, V2> transformValues( NavigableMap<K, V1> fromMap, Function<? super V1, V2> function) { return transformEntries(fromMap, asEntryTransformer(function)); }
class class_name[name] begin[{] method[transformValues, return_type[type[NavigableMap]], modifier[public static], parameter[fromMap, function]] begin[{] return[call[.transformEntries, parameter[member[.fromMap], call[.asEntryTransformer, parameter[member[.function]]]]]] end[}] END[}]
annotation[@] identifier[GwtIncompatible] Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V1] , identifier[V2] operator[>] identifier[NavigableMap] operator[<] identifier[K] , identifier[V2] operator[>] identifier[transformValues] operator[SEP] identifier[NavigableMap] operator[<] identifier[K] , identifier[V1] operator[>] identifier[fromMap] , identifier[Function] operator[<] operator[?] Keyword[super] identifier[V1] , identifier[V2] operator[>] identifier[function] operator[SEP] { Keyword[return] identifier[transformEntries] operator[SEP] identifier[fromMap] , identifier[asEntryTransformer] operator[SEP] identifier[function] operator[SEP] operator[SEP] operator[SEP] }
@Override public void validate(final File f) throws SAXException, IOException { validate(utf8SourceForFile(f), null); }
class class_name[name] begin[{] method[validate, return_type[void], modifier[public], parameter[f]] begin[{] call[.validate, parameter[call[.utf8SourceForFile, parameter[member[.f]]], literal[null]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[validate] operator[SEP] Keyword[final] identifier[File] identifier[f] operator[SEP] Keyword[throws] identifier[SAXException] , identifier[IOException] { identifier[validate] operator[SEP] identifier[utf8SourceForFile] operator[SEP] identifier[f] operator[SEP] , Other[null] operator[SEP] operator[SEP] }
public static void setValue(String branch, String entry, short type, String value) throws RegistryException, IOException, InterruptedException { if (type == RegistryEntry.TYPE_KEY) { String fullKey = ListUtil.trim(branch, "\\") + "\\" + ListUtil.trim(entry, "\\"); // String[] cmd = new String[]{"reg","add",cleanBrunch(fullKey),"/ve","/f"}; String[] cmd = new String[] { "reg", "add", cleanBrunch(fullKey), "/f" }; executeQuery(cmd); } else { if (type == RegistryEntry.TYPE_DWORD) value = Caster.toString(Caster.toIntValue(value, 0)); String[] cmd = new String[] { "reg", "add", cleanBrunch(branch), "/v", entry, "/t", RegistryEntry.toStringType(type), "/d", value, "/f" }; executeQuery(cmd); } }
class class_name[name] begin[{] method[setValue, return_type[void], modifier[public static], parameter[branch, entry, type, value]] begin[{] if[binary_operation[member[.type], ==, member[RegistryEntry.TYPE_KEY]]] begin[{] local_variable[type[String], fullKey] local_variable[type[String], cmd] call[.executeQuery, parameter[member[.cmd]]] else begin[{] if[binary_operation[member[.type], ==, member[RegistryEntry.TYPE_DWORD]]] begin[{] assign[member[.value], call[Caster.toString, parameter[call[Caster.toIntValue, parameter[member[.value], literal[0]]]]]] else begin[{] None end[}] local_variable[type[String], cmd] call[.executeQuery, parameter[member[.cmd]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[setValue] operator[SEP] identifier[String] identifier[branch] , identifier[String] identifier[entry] , Keyword[short] identifier[type] , identifier[String] identifier[value] operator[SEP] Keyword[throws] identifier[RegistryException] , identifier[IOException] , identifier[InterruptedException] { Keyword[if] operator[SEP] identifier[type] operator[==] identifier[RegistryEntry] operator[SEP] identifier[TYPE_KEY] operator[SEP] { identifier[String] identifier[fullKey] operator[=] identifier[ListUtil] operator[SEP] identifier[trim] operator[SEP] identifier[branch] , literal[String] operator[SEP] operator[+] literal[String] operator[+] identifier[ListUtil] operator[SEP] identifier[trim] operator[SEP] identifier[entry] , literal[String] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[cmd] operator[=] Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] , identifier[cleanBrunch] operator[SEP] identifier[fullKey] operator[SEP] , literal[String] } operator[SEP] identifier[executeQuery] operator[SEP] identifier[cmd] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[type] operator[==] identifier[RegistryEntry] operator[SEP] identifier[TYPE_DWORD] operator[SEP] identifier[value] operator[=] identifier[Caster] operator[SEP] identifier[toString] operator[SEP] identifier[Caster] operator[SEP] identifier[toIntValue] operator[SEP] identifier[value] , Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[cmd] operator[=] Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] , identifier[cleanBrunch] operator[SEP] identifier[branch] operator[SEP] , literal[String] , identifier[entry] , literal[String] , identifier[RegistryEntry] operator[SEP] identifier[toStringType] operator[SEP] identifier[type] operator[SEP] , literal[String] , identifier[value] , literal[String] } operator[SEP] identifier[executeQuery] operator[SEP] identifier[cmd] operator[SEP] operator[SEP] } }
public Object doGetObjectByIdentity(Identity id) throws PersistenceBrokerException { if (logger.isDebugEnabled()) logger.debug("getObjectByIdentity " + id); // check if object is present in ObjectCache: Object obj = objectCache.lookup(id); // only perform a db lookup if necessary (object not cached yet) if (obj == null) { obj = getDBObject(id); } else { ClassDescriptor cld = getClassDescriptor(obj.getClass()); // if specified in the ClassDescriptor the instance must be refreshed if (cld.isAlwaysRefresh()) { refreshInstance(obj, id, cld); } // now refresh all references checkRefreshRelationships(obj, id, cld); } // Invoke events on PersistenceBrokerAware instances and listeners AFTER_LOOKUP_EVENT.setTarget(obj); fireBrokerEvent(AFTER_LOOKUP_EVENT); AFTER_LOOKUP_EVENT.setTarget(null); //logger.info("RETRIEVING object " + obj); return obj; }
class class_name[name] begin[{] method[doGetObjectByIdentity, return_type[type[Object]], modifier[public], parameter[id]] begin[{] if[call[logger.isDebugEnabled, parameter[]]] begin[{] call[logger.debug, parameter[binary_operation[literal["getObjectByIdentity "], +, member[.id]]]] else begin[{] None end[}] local_variable[type[Object], obj] if[binary_operation[member[.obj], ==, literal[null]]] begin[{] assign[member[.obj], call[.getDBObject, parameter[member[.id]]]] else begin[{] local_variable[type[ClassDescriptor], cld] if[call[cld.isAlwaysRefresh, parameter[]]] begin[{] call[.refreshInstance, parameter[member[.obj], member[.id], member[.cld]]] else begin[{] None end[}] call[.checkRefreshRelationships, parameter[member[.obj], member[.id], member[.cld]]] end[}] call[AFTER_LOOKUP_EVENT.setTarget, parameter[member[.obj]]] call[.fireBrokerEvent, parameter[member[.AFTER_LOOKUP_EVENT]]] call[AFTER_LOOKUP_EVENT.setTarget, parameter[literal[null]]] return[member[.obj]] end[}] END[}]
Keyword[public] identifier[Object] identifier[doGetObjectByIdentity] operator[SEP] identifier[Identity] identifier[id] operator[SEP] Keyword[throws] identifier[PersistenceBrokerException] { Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[id] operator[SEP] operator[SEP] identifier[Object] identifier[obj] operator[=] identifier[objectCache] operator[SEP] identifier[lookup] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[obj] operator[==] Other[null] operator[SEP] { identifier[obj] operator[=] identifier[getDBObject] operator[SEP] identifier[id] operator[SEP] operator[SEP] } Keyword[else] { identifier[ClassDescriptor] identifier[cld] operator[=] identifier[getClassDescriptor] operator[SEP] identifier[obj] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cld] operator[SEP] identifier[isAlwaysRefresh] operator[SEP] operator[SEP] operator[SEP] { identifier[refreshInstance] operator[SEP] identifier[obj] , identifier[id] , identifier[cld] operator[SEP] operator[SEP] } identifier[checkRefreshRelationships] operator[SEP] identifier[obj] , identifier[id] , identifier[cld] operator[SEP] operator[SEP] } identifier[AFTER_LOOKUP_EVENT] operator[SEP] identifier[setTarget] operator[SEP] identifier[obj] operator[SEP] operator[SEP] identifier[fireBrokerEvent] operator[SEP] identifier[AFTER_LOOKUP_EVENT] operator[SEP] operator[SEP] identifier[AFTER_LOOKUP_EVENT] operator[SEP] identifier[setTarget] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[obj] operator[SEP] }
public final SshPublicKey updateSshPublicKey(String name, SshPublicKey sshPublicKey) { UpdateSshPublicKeyRequest request = UpdateSshPublicKeyRequest.newBuilder().setName(name).setSshPublicKey(sshPublicKey).build(); return updateSshPublicKey(request); }
class class_name[name] begin[{] method[updateSshPublicKey, return_type[type[SshPublicKey]], modifier[final public], parameter[name, sshPublicKey]] begin[{] local_variable[type[UpdateSshPublicKeyRequest], request] return[call[.updateSshPublicKey, parameter[member[.request]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[SshPublicKey] identifier[updateSshPublicKey] operator[SEP] identifier[String] identifier[name] , identifier[SshPublicKey] identifier[sshPublicKey] operator[SEP] { identifier[UpdateSshPublicKeyRequest] identifier[request] operator[=] identifier[UpdateSshPublicKeyRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setName] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[setSshPublicKey] operator[SEP] identifier[sshPublicKey] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[updateSshPublicKey] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static String safeTruncate(final String value, final int length, final String filler) { validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER); if (length == 0) { return ""; } if (length >= value.length()) { return value; } String[] words = words(value); StringJoiner result = new StringJoiner(" "); int spaceCount = 0; for (String word : words) { if (result.length() + word.length() + filler.length() + spaceCount > length) { break; } else { result.add(word); spaceCount++; } } return append(result.toString(), filler); }
class class_name[name] begin[{] method[safeTruncate, return_type[type[String]], modifier[public static], parameter[value, length, filler]] begin[{] call[.validate, parameter[member[.value], member[.NULL_STRING_PREDICATE], member[.NULL_STRING_MSG_SUPPLIER]]] if[binary_operation[member[.length], ==, literal[0]]] begin[{] return[literal[""]] else begin[{] None end[}] if[binary_operation[member[.length], >=, call[value.length, parameter[]]]] begin[{] return[member[.value]] else begin[{] None end[}] local_variable[type[String], words] local_variable[type[StringJoiner], result] local_variable[type[int], spaceCount] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=word, selectors=[], type_arguments=None), operator=+), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=filler, selectors=[], type_arguments=None), operator=+), operandr=MemberReference(member=spaceCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=word, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=spaceCount, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=words, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=word)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[call[.append, parameter[call[result.toString, parameter[]], member[.filler]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[safeTruncate] operator[SEP] Keyword[final] identifier[String] identifier[value] , Keyword[final] Keyword[int] identifier[length] , Keyword[final] identifier[String] identifier[filler] operator[SEP] { identifier[validate] operator[SEP] identifier[value] , identifier[NULL_STRING_PREDICATE] , identifier[NULL_STRING_MSG_SUPPLIER] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[return] literal[String] operator[SEP] } Keyword[if] operator[SEP] identifier[length] operator[>=] identifier[value] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[value] operator[SEP] } identifier[String] operator[SEP] operator[SEP] identifier[words] operator[=] identifier[words] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[StringJoiner] identifier[result] operator[=] Keyword[new] identifier[StringJoiner] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[spaceCount] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[word] operator[:] identifier[words] operator[SEP] { Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] identifier[word] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] identifier[filler] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] identifier[spaceCount] operator[>] identifier[length] operator[SEP] { Keyword[break] operator[SEP] } Keyword[else] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[word] operator[SEP] operator[SEP] identifier[spaceCount] operator[++] operator[SEP] } } Keyword[return] identifier[append] operator[SEP] identifier[result] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[filler] operator[SEP] operator[SEP] }
@Override protected void postGlobal() { assert(_res.model_info().get_params()._replicate_training_data); super.postGlobal(); // model averaging (DeepWaterTask only computed the per-node models, each on all the data) // _res.model_info().div(_res._chunk_node_count); _res.model_info().add_processed_global(_res.model_info().get_processed_local()); //switch from local counters to global counters _res.model_info().set_processed_local(0L); _sharedmodel = _res.model_info(); }
class class_name[name] begin[{] method[postGlobal, return_type[void], modifier[protected], parameter[]] begin[{] AssertStatement(condition=MethodInvocation(arguments=[], member=model_info, postfix_operators=[], prefix_operators=[], qualifier=_res, selectors=[], type_arguments=None), label=None, value=None) SuperMethodInvocation(arguments=[], member=postGlobal, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) call[_res.model_info, parameter[]] call[_res.model_info, parameter[]] assign[member[._sharedmodel], call[_res.model_info, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[postGlobal] operator[SEP] operator[SEP] { Keyword[assert] operator[SEP] identifier[_res] operator[SEP] identifier[model_info] operator[SEP] operator[SEP] operator[SEP] identifier[get_params] operator[SEP] operator[SEP] operator[SEP] identifier[_replicate_training_data] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[postGlobal] operator[SEP] operator[SEP] operator[SEP] identifier[_res] operator[SEP] identifier[model_info] operator[SEP] operator[SEP] operator[SEP] identifier[add_processed_global] operator[SEP] identifier[_res] operator[SEP] identifier[model_info] operator[SEP] operator[SEP] operator[SEP] identifier[get_processed_local] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[_res] operator[SEP] identifier[model_info] operator[SEP] operator[SEP] operator[SEP] identifier[set_processed_local] operator[SEP] Other[0L] operator[SEP] operator[SEP] identifier[_sharedmodel] operator[=] identifier[_res] operator[SEP] identifier[model_info] operator[SEP] operator[SEP] operator[SEP] }
BlockCrcInfoWritable getNextRecord() throws IOException { // By calling getBucketIdForNextRecord(), we make sure the next field // to read is the next record (if there is any record left in the file) // Also, by checking the return value, we know whether we've finished // the file. if (moveToNextRecordAndGetItsBucketId() == -1) { return null; } BlockCrcInfoWritable crcInfo = new BlockCrcInfoWritable(); crcInfo.readFields(in); numRecordsReadInBucket++; return crcInfo; }
class class_name[name] begin[{] method[getNextRecord, return_type[type[BlockCrcInfoWritable]], modifier[default], parameter[]] begin[{] if[binary_operation[call[.moveToNextRecordAndGetItsBucketId, parameter[]], ==, literal[1]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[BlockCrcInfoWritable], crcInfo] call[crcInfo.readFields, parameter[member[.in]]] member[.numRecordsReadInBucket] return[member[.crcInfo]] end[}] END[}]
identifier[BlockCrcInfoWritable] identifier[getNextRecord] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[moveToNextRecordAndGetItsBucketId] operator[SEP] operator[SEP] operator[==] operator[-] Other[1] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[BlockCrcInfoWritable] identifier[crcInfo] operator[=] Keyword[new] identifier[BlockCrcInfoWritable] operator[SEP] operator[SEP] operator[SEP] identifier[crcInfo] operator[SEP] identifier[readFields] operator[SEP] identifier[in] operator[SEP] operator[SEP] identifier[numRecordsReadInBucket] operator[++] operator[SEP] Keyword[return] identifier[crcInfo] operator[SEP] }