code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public static String exceptionStackTraceToString(final Throwable t) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw, true);
t.printStackTrace(pw);
StreamUtil.close(pw);
StreamUtil.close(sw);
return sw.toString();
} | class class_name[name] begin[{]
method[exceptionStackTraceToString, return_type[type[String]], modifier[public static], parameter[t]] begin[{]
local_variable[type[StringWriter], sw]
local_variable[type[PrintWriter], pw]
call[t.printStackTrace, parameter[member[.pw]]]
call[StreamUtil.close, parameter[member[.pw]]]
call[StreamUtil.close, parameter[member[.sw]]]
return[call[sw.toString, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[exceptionStackTraceToString] operator[SEP] Keyword[final] identifier[Throwable] identifier[t] operator[SEP] {
identifier[StringWriter] identifier[sw] operator[=] Keyword[new] identifier[StringWriter] operator[SEP] operator[SEP] operator[SEP] identifier[PrintWriter] identifier[pw] operator[=] Keyword[new] identifier[PrintWriter] operator[SEP] identifier[sw] , literal[boolean] operator[SEP] operator[SEP] identifier[t] operator[SEP] identifier[printStackTrace] operator[SEP] identifier[pw] operator[SEP] operator[SEP] identifier[StreamUtil] operator[SEP] identifier[close] operator[SEP] identifier[pw] operator[SEP] operator[SEP] identifier[StreamUtil] operator[SEP] identifier[close] operator[SEP] identifier[sw] operator[SEP] operator[SEP] Keyword[return] identifier[sw] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP]
}
|
@Override
protected void setMoments() {
super.setMoments();
for(Integer degree: momentDegrees) {
momentObservation.get(degree).addValue(moments.get(degree));
}
} | class class_name[name] begin[{]
method[setMoments, return_type[void], modifier[protected], parameter[]] begin[{]
SuperMethodInvocation(arguments=[], member=setMoments, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=degree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=momentObservation, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=degree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=moments, selectors=[], type_arguments=None)], member=addValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=momentDegrees, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=degree)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None)
end[}]
END[}] | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[setMoments] operator[SEP] operator[SEP] {
Keyword[super] operator[SEP] identifier[setMoments] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Integer] identifier[degree] operator[:] identifier[momentDegrees] operator[SEP] {
identifier[momentObservation] operator[SEP] identifier[get] operator[SEP] identifier[degree] operator[SEP] operator[SEP] identifier[addValue] operator[SEP] identifier[moments] operator[SEP] identifier[get] operator[SEP] identifier[degree] operator[SEP] operator[SEP] operator[SEP]
}
}
|
private void resetAlarmDueTimesOnReboot() {
// As the device has been rebooted, we use clock time rather than elapsed time since
// booting to set check whether we missed any alarms while the device was off and to
// make sure the next alarm time isn't too far in the future (indicating the system clock
// has been reset).
//
// We subtract the current time from the next expected alarm time and then do the
// following checks:
// * If it's less than zero, that means we missed an alarm when the device was off, so
// we schedule a replication immediately by setting the last alarm time to a time
// getIntervalInSeconds() ago.
// * If it's more than getIntervalInSeconds() in the future, that means the system clock
// has been reset since the last alarm was fired. Therefore, we check that the initial
// interval for the alarm is no later than getIntervalInSeconds() after the
// current time so we minimise the impact of the system clock being reset and will at most
// have to wait for the normal interval time.
// * Otherwise, the clock time for the alarm seems reasonable, but we still need to update
// the SharedPreference for the elapsed time since boot at which the last alarm would have
// fired as that currently refers to the time since boot from the previous boot of the
// device.
//
// We don't actually setup the AlarmManager here as it is up to the subclass to determine
// if all other conditions for the replication policy are met and determine whether to
// restart replications after a reboot.
setPeriodicReplicationEnabled(false);
long initialInterval = getNextAlarmDueClockTime() - System.currentTimeMillis();
if (initialInterval < 0) {
setLastAlarmTime(getIntervalInSeconds() * MILLISECONDS_IN_SECOND);
} else if (initialInterval > getIntervalInSeconds() * MILLISECONDS_IN_SECOND) {
setLastAlarmTime(0);
} else {
setLastAlarmTime((getIntervalInSeconds() * MILLISECONDS_IN_SECOND) - initialInterval);
}
} | class class_name[name] begin[{]
method[resetAlarmDueTimesOnReboot, return_type[void], modifier[private], parameter[]] begin[{]
call[.setPeriodicReplicationEnabled, parameter[literal[false]]]
local_variable[type[long], initialInterval]
if[binary_operation[member[.initialInterval], <, literal[0]]] begin[{]
call[.setLastAlarmTime, parameter[binary_operation[call[.getIntervalInSeconds, parameter[]], *, member[.MILLISECONDS_IN_SECOND]]]]
else begin[{]
if[binary_operation[member[.initialInterval], >, binary_operation[call[.getIntervalInSeconds, parameter[]], *, member[.MILLISECONDS_IN_SECOND]]]] begin[{]
call[.setLastAlarmTime, parameter[literal[0]]]
else begin[{]
call[.setLastAlarmTime, parameter[binary_operation[binary_operation[call[.getIntervalInSeconds, parameter[]], *, member[.MILLISECONDS_IN_SECOND]], -, member[.initialInterval]]]]
end[}]
end[}]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[resetAlarmDueTimesOnReboot] operator[SEP] operator[SEP] {
identifier[setPeriodicReplicationEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[long] identifier[initialInterval] operator[=] identifier[getNextAlarmDueClockTime] operator[SEP] operator[SEP] operator[-] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[initialInterval] operator[<] Other[0] operator[SEP] {
identifier[setLastAlarmTime] operator[SEP] identifier[getIntervalInSeconds] operator[SEP] operator[SEP] operator[*] identifier[MILLISECONDS_IN_SECOND] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[initialInterval] operator[>] identifier[getIntervalInSeconds] operator[SEP] operator[SEP] operator[*] identifier[MILLISECONDS_IN_SECOND] operator[SEP] {
identifier[setLastAlarmTime] operator[SEP] Other[0] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[setLastAlarmTime] operator[SEP] operator[SEP] identifier[getIntervalInSeconds] operator[SEP] operator[SEP] operator[*] identifier[MILLISECONDS_IN_SECOND] operator[SEP] operator[-] identifier[initialInterval] operator[SEP] operator[SEP]
}
}
|
public static synchronized void setupSslVerification(String host) throws Exception {
if (sslVerificationHosts == null)
sslVerificationHosts = new ArrayList<String>();
if (!sslVerificationHosts.contains(host)) {
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
// initialize tmf with the default trust store
tmf.init((KeyStore)null);
// get the default trust manager
X509TrustManager defaultTm = null;
for (TrustManager tm : tmf.getTrustManagers()) {
if (tm instanceof X509TrustManager) {
defaultTm = (X509TrustManager) tm;
break;
}
}
TrustManager[] trustManager = new TrustManager[] { new BlindTrustManager(defaultTm, host) };
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, trustManager, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
HostnameVerifier defaultHv = HttpsURLConnection.getDefaultHostnameVerifier();
HostnameVerifier hostnameVerifier = new DesignatedHostnameVerifier(defaultHv, host);
HttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier);
sslVerificationHosts.add(host);
}
} | class class_name[name] begin[{]
method[setupSslVerification, return_type[void], modifier[synchronized public static], parameter[host]] begin[{]
if[binary_operation[member[.sslVerificationHosts], ==, literal[null]]] begin[{]
assign[member[.sslVerificationHosts], 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=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))]
else begin[{]
None
end[}]
if[call[sslVerificationHosts.contains, parameter[member[.host]]]] begin[{]
local_variable[type[TrustManagerFactory], tmf]
call[tmf.init, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=KeyStore, sub_type=None))]]
local_variable[type[X509TrustManager], defaultTm]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=X509TrustManager, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=defaultTm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=tm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=X509TrustManager, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getTrustManagers, postfix_operators=[], prefix_operators=[], qualifier=tmf, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=tm)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TrustManager, sub_type=None))), label=None)
local_variable[type[TrustManager], trustManager]
local_variable[type[SSLContext], sc]
call[sc.init, parameter[literal[null], member[.trustManager], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=security, sub_type=ReferenceType(arguments=None, dimensions=None, name=SecureRandom, sub_type=None))))]]
call[HttpsURLConnection.setDefaultSSLSocketFactory, parameter[call[sc.getSocketFactory, parameter[]]]]
local_variable[type[HostnameVerifier], defaultHv]
local_variable[type[HostnameVerifier], hostnameVerifier]
call[HttpsURLConnection.setDefaultHostnameVerifier, parameter[member[.hostnameVerifier]]]
call[sslVerificationHosts.add, parameter[member[.host]]]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[synchronized] Keyword[void] identifier[setupSslVerification] operator[SEP] identifier[String] identifier[host] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[sslVerificationHosts] operator[==] Other[null] operator[SEP] identifier[sslVerificationHosts] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[sslVerificationHosts] operator[SEP] identifier[contains] operator[SEP] identifier[host] operator[SEP] operator[SEP] {
identifier[TrustManagerFactory] identifier[tmf] operator[=] identifier[TrustManagerFactory] operator[SEP] identifier[getInstance] operator[SEP] identifier[TrustManagerFactory] operator[SEP] identifier[getDefaultAlgorithm] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[tmf] operator[SEP] identifier[init] operator[SEP] operator[SEP] identifier[KeyStore] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[X509TrustManager] identifier[defaultTm] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[TrustManager] identifier[tm] operator[:] identifier[tmf] operator[SEP] identifier[getTrustManagers] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[tm] Keyword[instanceof] identifier[X509TrustManager] operator[SEP] {
identifier[defaultTm] operator[=] operator[SEP] identifier[X509TrustManager] operator[SEP] identifier[tm] operator[SEP] Keyword[break] operator[SEP]
}
}
identifier[TrustManager] operator[SEP] operator[SEP] identifier[trustManager] operator[=] Keyword[new] identifier[TrustManager] operator[SEP] operator[SEP] {
Keyword[new] identifier[BlindTrustManager] operator[SEP] identifier[defaultTm] , identifier[host] operator[SEP]
} operator[SEP] identifier[SSLContext] identifier[sc] operator[=] identifier[SSLContext] operator[SEP] identifier[getInstance] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sc] operator[SEP] identifier[init] operator[SEP] Other[null] , identifier[trustManager] , Keyword[new] identifier[java] operator[SEP] identifier[security] operator[SEP] identifier[SecureRandom] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[HttpsURLConnection] operator[SEP] identifier[setDefaultSSLSocketFactory] operator[SEP] identifier[sc] operator[SEP] identifier[getSocketFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[HostnameVerifier] identifier[defaultHv] operator[=] identifier[HttpsURLConnection] operator[SEP] identifier[getDefaultHostnameVerifier] operator[SEP] operator[SEP] operator[SEP] identifier[HostnameVerifier] identifier[hostnameVerifier] operator[=] Keyword[new] identifier[DesignatedHostnameVerifier] operator[SEP] identifier[defaultHv] , identifier[host] operator[SEP] operator[SEP] identifier[HttpsURLConnection] operator[SEP] identifier[setDefaultHostnameVerifier] operator[SEP] identifier[hostnameVerifier] operator[SEP] operator[SEP] identifier[sslVerificationHosts] operator[SEP] identifier[add] operator[SEP] identifier[host] operator[SEP] operator[SEP]
}
}
|
public void marshall(ListTopicsDetectionJobsRequest listTopicsDetectionJobsRequest, ProtocolMarshaller protocolMarshaller) {
if (listTopicsDetectionJobsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(listTopicsDetectionJobsRequest.getFilter(), FILTER_BINDING);
protocolMarshaller.marshall(listTopicsDetectionJobsRequest.getNextToken(), NEXTTOKEN_BINDING);
protocolMarshaller.marshall(listTopicsDetectionJobsRequest.getMaxResults(), MAXRESULTS_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[listTopicsDetectionJobsRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.listTopicsDetectionJobsRequest], ==, 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=getFilter, postfix_operators=[], prefix_operators=[], qualifier=listTopicsDetectionJobsRequest, selectors=[], type_arguments=None), MemberReference(member=FILTER_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNextToken, postfix_operators=[], prefix_operators=[], qualifier=listTopicsDetectionJobsRequest, selectors=[], type_arguments=None), MemberReference(member=NEXTTOKEN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMaxResults, postfix_operators=[], prefix_operators=[], qualifier=listTopicsDetectionJobsRequest, selectors=[], type_arguments=None), MemberReference(member=MAXRESULTS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], 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[ListTopicsDetectionJobsRequest] identifier[listTopicsDetectionJobsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[listTopicsDetectionJobsRequest] 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[listTopicsDetectionJobsRequest] operator[SEP] identifier[getFilter] operator[SEP] operator[SEP] , identifier[FILTER_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listTopicsDetectionJobsRequest] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listTopicsDetectionJobsRequest] operator[SEP] identifier[getMaxResults] operator[SEP] operator[SEP] , identifier[MAXRESULTS_BINDING] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] {
Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP]
}
}
|
public static List<Kontonummer> getKontonummerListForAccountType(String accountType, int length) {
KontonummerValidator.validateAccountTypeSyntax(accountType);
final class AccountTypeKontonrDigitGenerator extends KontonummerDigitGenerator {
private final String accountType;
AccountTypeKontonrDigitGenerator(String accountType) {
this.accountType = accountType;
}
@Override
String generateKontonummer() {
StringBuilder kontonrBuffer = new StringBuilder(LENGTH);
for (int i = 0; i < LENGTH;) {
if (i == ACCOUNTTYPE_START_DIGIT) {
kontonrBuffer.append(accountType);
i += accountType.length();
} else {
kontonrBuffer.append((int) (Math.random() * 10));
i++;
}
}
return kontonrBuffer.toString();
}
}
return getKontonummerListUsingGenerator(new AccountTypeKontonrDigitGenerator(accountType), length);
} | class class_name[name] begin[{]
method[getKontonummerListForAccountType, return_type[type[List]], modifier[public static], parameter[accountType, length]] begin[{]
call[KontonummerValidator.validateAccountTypeSyntax, parameter[member[.accountType]]]
class class_name[AccountTypeKontonrDigitGenerator] begin[{]
type[String] field[accountType]
method[AccountTypeKontonrDigitGenerator, modifier[default], parameter[accountType]] begin[{]
assign[THIS[member[None.accountType]], member[.accountType]]
end[}]
method[generateKontonummer, return_type[type[String]], modifier[default], parameter[]] begin[{]
local_variable[type[StringBuilder], kontonrBuffer]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ACCOUNTTYPE_START_DIGIT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=random, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), operator=*), type=BasicType(dimensions=[], name=int))], member=append, postfix_operators=[], prefix_operators=[], qualifier=kontonrBuffer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=accountType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=kontonrBuffer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=accountType, selectors=[], type_arguments=None)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LENGTH, postfix_operators=[], prefix_operators=[], qualifier=, 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=None), label=None)
return[call[kontonrBuffer.toString, parameter[]]]
end[}]
END[}]
return[call[.getKontonummerListUsingGenerator, parameter[ClassCreator(arguments=[MemberReference(member=accountType, 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=AccountTypeKontonrDigitGenerator, sub_type=None)), member[.length]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Kontonummer] operator[>] identifier[getKontonummerListForAccountType] operator[SEP] identifier[String] identifier[accountType] , Keyword[int] identifier[length] operator[SEP] {
identifier[KontonummerValidator] operator[SEP] identifier[validateAccountTypeSyntax] operator[SEP] identifier[accountType] operator[SEP] operator[SEP] Keyword[final] Keyword[class] identifier[AccountTypeKontonrDigitGenerator] Keyword[extends] identifier[KontonummerDigitGenerator] {
Keyword[private] Keyword[final] identifier[String] identifier[accountType] operator[SEP] identifier[AccountTypeKontonrDigitGenerator] operator[SEP] identifier[String] identifier[accountType] operator[SEP] {
Keyword[this] operator[SEP] identifier[accountType] operator[=] identifier[accountType] operator[SEP]
} annotation[@] identifier[Override] identifier[String] identifier[generateKontonummer] operator[SEP] operator[SEP] {
identifier[StringBuilder] identifier[kontonrBuffer] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[LENGTH] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[LENGTH] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[i] operator[==] identifier[ACCOUNTTYPE_START_DIGIT] operator[SEP] {
identifier[kontonrBuffer] operator[SEP] identifier[append] operator[SEP] identifier[accountType] operator[SEP] operator[SEP] identifier[i] operator[+=] identifier[accountType] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[kontonrBuffer] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[Math] operator[SEP] identifier[random] operator[SEP] operator[SEP] operator[*] Other[10] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP]
}
}
Keyword[return] identifier[kontonrBuffer] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[return] identifier[getKontonummerListUsingGenerator] operator[SEP] Keyword[new] identifier[AccountTypeKontonrDigitGenerator] operator[SEP] identifier[accountType] operator[SEP] , identifier[length] operator[SEP] operator[SEP]
}
|
public SIMPIterator getStreams() throws SIMPControllableNotFoundException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getStreams");
assertValidControllable();
Iterator it = null;
try
{
it = _streamSet.iterator();
}
catch (SIResourceException e)
{
FFDCFilter.processException(
e,
"com.ibm.ws.sib.processor.runtime.SourceStreamSetControl.getStreams",
"1:713:1.39",
this);
SIMPRuntimeOperationFailedException finalE =
new SIMPRuntimeOperationFailedException(
nls.getFormattedMessage(
"INTERNAL_MESSAGING_ERROR_CWSIP0002",
new Object[] {"SourceStreamSetControl.getStreams",
"1:721:1.39",
e},
null), e);
SibTr.exception(tc, finalE);
// if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getStreams", finalE);
// throw finalE;
}
SIMPIterator returnIterator=new SourceStreamControllableIterator(it);
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "getStreams", returnIterator);
return returnIterator;
} | class class_name[name] begin[{]
method[getStreams, return_type[type[SIMPIterator]], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member[.tc], literal["getStreams"]]]
else begin[{]
None
end[}]
call[.assertValidControllable, parameter[]]
local_variable[type[Iterator], it]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=it, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=_streamSet, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.runtime.SourceStreamSetControl.getStreams"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:713:1.39"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="INTERNAL_MESSAGING_ERROR_CWSIP0002"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SourceStreamSetControl.getStreams"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:721:1.39"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getFormattedMessage, postfix_operators=[], prefix_operators=[], qualifier=nls, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SIMPRuntimeOperationFailedException, sub_type=None)), name=finalE)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SIMPRuntimeOperationFailedException, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=finalE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIResourceException']))], finally_block=None, label=None, resources=None)
local_variable[type[SIMPIterator], returnIterator]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.exit, parameter[member[.tc], literal["getStreams"], member[.returnIterator]]]
else begin[{]
None
end[}]
return[member[.returnIterator]]
end[}]
END[}] | Keyword[public] identifier[SIMPIterator] identifier[getStreams] operator[SEP] operator[SEP] Keyword[throws] identifier[SIMPControllableNotFoundException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[assertValidControllable] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] identifier[it] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[it] operator[=] identifier[_streamSet] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[SIResourceException] identifier[e] operator[SEP] {
identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[SIMPRuntimeOperationFailedException] identifier[finalE] operator[=] Keyword[new] identifier[SIMPRuntimeOperationFailedException] operator[SEP] identifier[nls] operator[SEP] identifier[getFormattedMessage] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] {
literal[String] , literal[String] , identifier[e]
} , Other[null] operator[SEP] , identifier[e] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] identifier[tc] , identifier[finalE] operator[SEP] operator[SEP]
}
identifier[SIMPIterator] identifier[returnIterator] operator[=] Keyword[new] identifier[SourceStreamControllableIterator] operator[SEP] identifier[it] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[returnIterator] operator[SEP] operator[SEP] Keyword[return] identifier[returnIterator] operator[SEP]
}
|
public ServiceFuture<Void> startAsync(String groupName, String serviceName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(startWithServiceResponseAsync(groupName, serviceName), serviceCallback);
} | class class_name[name] begin[{]
method[startAsync, return_type[type[ServiceFuture]], modifier[public], parameter[groupName, serviceName, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.startWithServiceResponseAsync, parameter[member[.groupName], member[.serviceName]]], member[.serviceCallback]]]]
end[}]
END[}] | Keyword[public] identifier[ServiceFuture] operator[<] identifier[Void] operator[>] identifier[startAsync] operator[SEP] identifier[String] identifier[groupName] , identifier[String] identifier[serviceName] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[Void] operator[>] identifier[serviceCallback] operator[SEP] {
Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[startWithServiceResponseAsync] operator[SEP] identifier[groupName] , identifier[serviceName] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP]
}
|
public final long getLong48(final int pos) {
final int position = origin + pos;
if (pos + 5 >= limit || pos < 0) throw new IllegalArgumentException("limit excceed: "
+ (pos < 0 ? pos : (pos + 5)));
byte[] buf = buffer;
return ((long) (0xff & buf[position])) | ((long) (0xff & buf[position + 1]) << 8)
| ((long) (0xff & buf[position + 2]) << 16) | ((long) (0xff & buf[position + 3]) << 24)
| ((long) (0xff & buf[position + 4]) << 32) | ((long) (buf[position + 5]) << 40);
} | class class_name[name] begin[{]
method[getLong48, return_type[type[long]], modifier[final public], parameter[pos]] begin[{]
local_variable[type[int], position]
if[binary_operation[binary_operation[binary_operation[member[.pos], +, literal[5]], >=, member[.limit]], ||, binary_operation[member[.pos], <, literal[0]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="limit excceed: "), operandr=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), if_false=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), operator=+), if_true=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)
else begin[{]
None
end[}]
local_variable[type[byte], buf]
return[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operandr=MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=&), type=BasicType(dimensions=[], name=long)), |, binary_operation[Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operandr=MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operator=&), type=BasicType(dimensions=[], name=long)), <<, literal[8]]], |, binary_operation[Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operandr=MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+))]), operator=&), type=BasicType(dimensions=[], name=long)), <<, literal[16]]], |, binary_operation[Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operandr=MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+))]), operator=&), type=BasicType(dimensions=[], name=long)), <<, literal[24]]], |, binary_operation[Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operandr=MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+))]), operator=&), type=BasicType(dimensions=[], name=long)), <<, literal[32]]], |, binary_operation[Cast(expression=MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=long)), <<, literal[40]]]]
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[long] identifier[getLong48] operator[SEP] Keyword[final] Keyword[int] identifier[pos] operator[SEP] {
Keyword[final] Keyword[int] identifier[position] operator[=] identifier[origin] operator[+] identifier[pos] operator[SEP] Keyword[if] operator[SEP] identifier[pos] operator[+] Other[5] operator[>=] identifier[limit] operator[||] identifier[pos] operator[<] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] operator[SEP] identifier[pos] operator[<] Other[0] operator[?] identifier[pos] operator[:] operator[SEP] identifier[pos] operator[+] Other[5] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buf] operator[=] identifier[buffer] operator[SEP] Keyword[return] operator[SEP] operator[SEP] Keyword[long] operator[SEP] operator[SEP] literal[Integer] operator[&] identifier[buf] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[SEP] operator[|] operator[SEP] operator[SEP] Keyword[long] operator[SEP] operator[SEP] literal[Integer] operator[&] identifier[buf] operator[SEP] identifier[position] operator[+] Other[1] operator[SEP] operator[SEP] operator[<<] Other[8] operator[SEP] operator[|] operator[SEP] operator[SEP] Keyword[long] operator[SEP] operator[SEP] literal[Integer] operator[&] identifier[buf] operator[SEP] identifier[position] operator[+] Other[2] operator[SEP] operator[SEP] operator[<<] Other[16] operator[SEP] operator[|] operator[SEP] operator[SEP] Keyword[long] operator[SEP] operator[SEP] literal[Integer] operator[&] identifier[buf] operator[SEP] identifier[position] operator[+] Other[3] operator[SEP] operator[SEP] operator[<<] Other[24] operator[SEP] operator[|] operator[SEP] operator[SEP] Keyword[long] operator[SEP] operator[SEP] literal[Integer] operator[&] identifier[buf] operator[SEP] identifier[position] operator[+] Other[4] operator[SEP] operator[SEP] operator[<<] Other[32] operator[SEP] operator[|] operator[SEP] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[position] operator[+] Other[5] operator[SEP] operator[SEP] operator[<<] Other[40] operator[SEP] operator[SEP]
}
|
void addValToSets(List<RBBINode> sets, int val) {
for (RBBINode usetNode : sets) {
addValToSet(usetNode, val);
}
} | class class_name[name] begin[{]
method[addValToSets, return_type[void], modifier[default], parameter[sets, val]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=usetNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addValToSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=sets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=usetNode)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RBBINode, sub_type=None))), label=None)
end[}]
END[}] | Keyword[void] identifier[addValToSets] operator[SEP] identifier[List] operator[<] identifier[RBBINode] operator[>] identifier[sets] , Keyword[int] identifier[val] operator[SEP] {
Keyword[for] operator[SEP] identifier[RBBINode] identifier[usetNode] operator[:] identifier[sets] operator[SEP] {
identifier[addValToSet] operator[SEP] identifier[usetNode] , identifier[val] operator[SEP] operator[SEP]
}
}
|
public static Engine takagiSugeno() {
Engine engine = new Engine();
engine.setName("approximation");
engine.setDescription("approximation of sin(x)/x");
InputVariable inputX = new InputVariable();
inputX.setName("inputX");
inputX.setDescription("value of x");
inputX.setEnabled(true);
inputX.setRange(0.000, 10.000);
inputX.setLockValueInRange(false);
inputX.addTerm(new Triangle("NEAR_1", 0.000, 1.000, 2.000));
inputX.addTerm(new Triangle("NEAR_2", 1.000, 2.000, 3.000));
inputX.addTerm(new Triangle("NEAR_3", 2.000, 3.000, 4.000));
inputX.addTerm(new Triangle("NEAR_4", 3.000, 4.000, 5.000));
inputX.addTerm(new Triangle("NEAR_5", 4.000, 5.000, 6.000));
inputX.addTerm(new Triangle("NEAR_6", 5.000, 6.000, 7.000));
inputX.addTerm(new Triangle("NEAR_7", 6.000, 7.000, 8.000));
inputX.addTerm(new Triangle("NEAR_8", 7.000, 8.000, 9.000));
inputX.addTerm(new Triangle("NEAR_9", 8.000, 9.000, 10.000));
engine.addInputVariable(inputX);
OutputVariable outputFx = new OutputVariable();
outputFx.setName("outputFx");
outputFx.setDescription("value of the approximation of x");
outputFx.setEnabled(true);
outputFx.setRange(-1.000, 1.000);
outputFx.setLockValueInRange(false);
outputFx.setAggregation(null);
outputFx.setDefuzzifier(new WeightedAverage("Automatic"));
outputFx.setDefaultValue(Double.NaN);
outputFx.setLockPreviousValue(true);
outputFx.addTerm(new Constant("f1", 0.840));
outputFx.addTerm(new Constant("f2", 0.450));
outputFx.addTerm(new Constant("f3", 0.040));
outputFx.addTerm(new Constant("f4", -0.180));
outputFx.addTerm(new Constant("f5", -0.190));
outputFx.addTerm(new Constant("f6", -0.040));
outputFx.addTerm(new Constant("f7", 0.090));
outputFx.addTerm(new Constant("f8", 0.120));
outputFx.addTerm(new Constant("f9", 0.040));
engine.addOutputVariable(outputFx);
OutputVariable trueValue = new OutputVariable();
trueValue.setName("trueValue");
trueValue.setDescription("value of f(x)=sin(x)/x");
trueValue.setEnabled(true);
trueValue.setRange(-1.060, 1.000);
trueValue.setLockValueInRange(false);
trueValue.setAggregation(null);
trueValue.setDefuzzifier(new WeightedAverage("Automatic"));
trueValue.setDefaultValue(Double.NaN);
trueValue.setLockPreviousValue(true);
trueValue.addTerm(Function.create("fx", "sin(inputX)/inputX", engine));
engine.addOutputVariable(trueValue);
OutputVariable difference = new OutputVariable();
difference.setName("difference");
difference.setDescription("error e=f(x) - f'(x)");
difference.setEnabled(true);
difference.setRange(-1.000, 1.000);
difference.setLockValueInRange(false);
difference.setAggregation(null);
difference.setDefuzzifier(new WeightedAverage("Automatic"));
difference.setDefaultValue(Double.NaN);
difference.setLockPreviousValue(false);
difference.addTerm(Function.create("error", "outputFx-trueValue", engine));
engine.addOutputVariable(difference);
RuleBlock ruleBlock = new RuleBlock();
ruleBlock.setName("");
ruleBlock.setDescription("");
ruleBlock.setEnabled(true);
ruleBlock.setConjunction(null);
ruleBlock.setDisjunction(null);
ruleBlock.setImplication(new AlgebraicProduct());
ruleBlock.setActivation(new General());
ruleBlock.addRule(Rule.parse("if inputX is NEAR_1 then outputFx is f1", engine));
ruleBlock.addRule(Rule.parse("if inputX is NEAR_2 then outputFx is f2", engine));
ruleBlock.addRule(Rule.parse("if inputX is NEAR_3 then outputFx is f3", engine));
ruleBlock.addRule(Rule.parse("if inputX is NEAR_4 then outputFx is f4", engine));
ruleBlock.addRule(Rule.parse("if inputX is NEAR_5 then outputFx is f5", engine));
ruleBlock.addRule(Rule.parse("if inputX is NEAR_6 then outputFx is f6", engine));
ruleBlock.addRule(Rule.parse("if inputX is NEAR_7 then outputFx is f7", engine));
ruleBlock.addRule(Rule.parse("if inputX is NEAR_8 then outputFx is f8", engine));
ruleBlock.addRule(Rule.parse("if inputX is NEAR_9 then outputFx is f9", engine));
ruleBlock.addRule(Rule.parse("if inputX is any then trueValue is fx and difference is error", engine));
engine.addRuleBlock(ruleBlock);
return engine;
} | class class_name[name] begin[{]
method[takagiSugeno, return_type[type[Engine]], modifier[public static], parameter[]] begin[{]
local_variable[type[Engine], engine]
call[engine.setName, parameter[literal["approximation"]]]
call[engine.setDescription, parameter[literal["approximation of sin(x)/x"]]]
local_variable[type[InputVariable], inputX]
call[inputX.setName, parameter[literal["inputX"]]]
call[inputX.setDescription, parameter[literal["value of x"]]]
call[inputX.setEnabled, parameter[literal[true]]]
call[inputX.setRange, parameter[literal[0.000], literal[10.000]]]
call[inputX.setLockValueInRange, parameter[literal[false]]]
call[inputX.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="NEAR_1"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.000)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]]
call[inputX.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="NEAR_2"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.000)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]]
call[inputX.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="NEAR_3"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4.000)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]]
call[inputX.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="NEAR_4"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5.000)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]]
call[inputX.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="NEAR_5"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6.000)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]]
call[inputX.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="NEAR_6"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7.000)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]]
call[inputX.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="NEAR_7"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8.000)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]]
call[inputX.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="NEAR_8"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=9.000)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]]
call[inputX.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="NEAR_9"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=9.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10.000)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]]
call[engine.addInputVariable, parameter[member[.inputX]]]
local_variable[type[OutputVariable], outputFx]
call[outputFx.setName, parameter[literal["outputFx"]]]
call[outputFx.setDescription, parameter[literal["value of the approximation of x"]]]
call[outputFx.setEnabled, parameter[literal[true]]]
call[outputFx.setRange, parameter[literal[1.000], literal[1.000]]]
call[outputFx.setLockValueInRange, parameter[literal[false]]]
call[outputFx.setAggregation, parameter[literal[null]]]
call[outputFx.setDefuzzifier, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Automatic")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WeightedAverage, sub_type=None))]]
call[outputFx.setDefaultValue, parameter[member[Double.NaN]]]
call[outputFx.setLockPreviousValue, parameter[literal[true]]]
call[outputFx.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="f1"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.840)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Constant, sub_type=None))]]
call[outputFx.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="f2"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.450)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Constant, sub_type=None))]]
call[outputFx.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="f3"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.040)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Constant, sub_type=None))]]
call[outputFx.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="f4"), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=0.180)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Constant, sub_type=None))]]
call[outputFx.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="f5"), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=0.190)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Constant, sub_type=None))]]
call[outputFx.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="f6"), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=0.040)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Constant, sub_type=None))]]
call[outputFx.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="f7"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.090)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Constant, sub_type=None))]]
call[outputFx.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="f8"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.120)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Constant, sub_type=None))]]
call[outputFx.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="f9"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.040)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Constant, sub_type=None))]]
call[engine.addOutputVariable, parameter[member[.outputFx]]]
local_variable[type[OutputVariable], trueValue]
call[trueValue.setName, parameter[literal["trueValue"]]]
call[trueValue.setDescription, parameter[literal["value of f(x)=sin(x)/x"]]]
call[trueValue.setEnabled, parameter[literal[true]]]
call[trueValue.setRange, parameter[literal[1.060], literal[1.000]]]
call[trueValue.setLockValueInRange, parameter[literal[false]]]
call[trueValue.setAggregation, parameter[literal[null]]]
call[trueValue.setDefuzzifier, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Automatic")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WeightedAverage, sub_type=None))]]
call[trueValue.setDefaultValue, parameter[member[Double.NaN]]]
call[trueValue.setLockPreviousValue, parameter[literal[true]]]
call[trueValue.addTerm, parameter[call[Function.create, parameter[literal["fx"], literal["sin(inputX)/inputX"], member[.engine]]]]]
call[engine.addOutputVariable, parameter[member[.trueValue]]]
local_variable[type[OutputVariable], difference]
call[difference.setName, parameter[literal["difference"]]]
call[difference.setDescription, parameter[literal["error e=f(x) - f'(x)"]]]
call[difference.setEnabled, parameter[literal[true]]]
call[difference.setRange, parameter[literal[1.000], literal[1.000]]]
call[difference.setLockValueInRange, parameter[literal[false]]]
call[difference.setAggregation, parameter[literal[null]]]
call[difference.setDefuzzifier, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Automatic")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WeightedAverage, sub_type=None))]]
call[difference.setDefaultValue, parameter[member[Double.NaN]]]
call[difference.setLockPreviousValue, parameter[literal[false]]]
call[difference.addTerm, parameter[call[Function.create, parameter[literal["error"], literal["outputFx-trueValue"], member[.engine]]]]]
call[engine.addOutputVariable, parameter[member[.difference]]]
local_variable[type[RuleBlock], ruleBlock]
call[ruleBlock.setName, parameter[literal[""]]]
call[ruleBlock.setDescription, parameter[literal[""]]]
call[ruleBlock.setEnabled, parameter[literal[true]]]
call[ruleBlock.setConjunction, parameter[literal[null]]]
call[ruleBlock.setDisjunction, parameter[literal[null]]]
call[ruleBlock.setImplication, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AlgebraicProduct, sub_type=None))]]
call[ruleBlock.setActivation, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=General, sub_type=None))]]
call[ruleBlock.addRule, parameter[call[Rule.parse, parameter[literal["if inputX is NEAR_1 then outputFx is f1"], member[.engine]]]]]
call[ruleBlock.addRule, parameter[call[Rule.parse, parameter[literal["if inputX is NEAR_2 then outputFx is f2"], member[.engine]]]]]
call[ruleBlock.addRule, parameter[call[Rule.parse, parameter[literal["if inputX is NEAR_3 then outputFx is f3"], member[.engine]]]]]
call[ruleBlock.addRule, parameter[call[Rule.parse, parameter[literal["if inputX is NEAR_4 then outputFx is f4"], member[.engine]]]]]
call[ruleBlock.addRule, parameter[call[Rule.parse, parameter[literal["if inputX is NEAR_5 then outputFx is f5"], member[.engine]]]]]
call[ruleBlock.addRule, parameter[call[Rule.parse, parameter[literal["if inputX is NEAR_6 then outputFx is f6"], member[.engine]]]]]
call[ruleBlock.addRule, parameter[call[Rule.parse, parameter[literal["if inputX is NEAR_7 then outputFx is f7"], member[.engine]]]]]
call[ruleBlock.addRule, parameter[call[Rule.parse, parameter[literal["if inputX is NEAR_8 then outputFx is f8"], member[.engine]]]]]
call[ruleBlock.addRule, parameter[call[Rule.parse, parameter[literal["if inputX is NEAR_9 then outputFx is f9"], member[.engine]]]]]
call[ruleBlock.addRule, parameter[call[Rule.parse, parameter[literal["if inputX is any then trueValue is fx and difference is error"], member[.engine]]]]]
call[engine.addRuleBlock, parameter[member[.ruleBlock]]]
return[member[.engine]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Engine] identifier[takagiSugeno] operator[SEP] operator[SEP] {
identifier[Engine] identifier[engine] operator[=] Keyword[new] identifier[Engine] operator[SEP] operator[SEP] operator[SEP] identifier[engine] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[engine] operator[SEP] identifier[setDescription] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[InputVariable] identifier[inputX] operator[=] Keyword[new] identifier[InputVariable] operator[SEP] operator[SEP] operator[SEP] identifier[inputX] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[inputX] operator[SEP] identifier[setDescription] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[inputX] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[inputX] operator[SEP] identifier[setRange] operator[SEP] literal[Float] , literal[Float] operator[SEP] operator[SEP] identifier[inputX] operator[SEP] identifier[setLockValueInRange] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[inputX] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[inputX] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[inputX] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[inputX] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[inputX] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[inputX] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[inputX] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[inputX] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[inputX] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[engine] operator[SEP] identifier[addInputVariable] operator[SEP] identifier[inputX] operator[SEP] operator[SEP] identifier[OutputVariable] identifier[outputFx] operator[=] Keyword[new] identifier[OutputVariable] operator[SEP] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[setDescription] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[setRange] operator[SEP] operator[-] literal[Float] , literal[Float] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[setLockValueInRange] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[setAggregation] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[setDefuzzifier] operator[SEP] Keyword[new] identifier[WeightedAverage] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[setDefaultValue] operator[SEP] identifier[Double] operator[SEP] identifier[NaN] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[setLockPreviousValue] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Constant] operator[SEP] literal[String] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Constant] operator[SEP] literal[String] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Constant] operator[SEP] literal[String] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Constant] operator[SEP] literal[String] , operator[-] literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Constant] operator[SEP] literal[String] , operator[-] literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Constant] operator[SEP] literal[String] , operator[-] literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Constant] operator[SEP] literal[String] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Constant] operator[SEP] literal[String] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[outputFx] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Constant] operator[SEP] literal[String] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[engine] operator[SEP] identifier[addOutputVariable] operator[SEP] identifier[outputFx] operator[SEP] operator[SEP] identifier[OutputVariable] identifier[trueValue] operator[=] Keyword[new] identifier[OutputVariable] operator[SEP] operator[SEP] operator[SEP] identifier[trueValue] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[trueValue] operator[SEP] identifier[setDescription] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[trueValue] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[trueValue] operator[SEP] identifier[setRange] operator[SEP] operator[-] literal[Float] , literal[Float] operator[SEP] operator[SEP] identifier[trueValue] operator[SEP] identifier[setLockValueInRange] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[trueValue] operator[SEP] identifier[setAggregation] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[trueValue] operator[SEP] identifier[setDefuzzifier] operator[SEP] Keyword[new] identifier[WeightedAverage] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[trueValue] operator[SEP] identifier[setDefaultValue] operator[SEP] identifier[Double] operator[SEP] identifier[NaN] operator[SEP] operator[SEP] identifier[trueValue] operator[SEP] identifier[setLockPreviousValue] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[trueValue] operator[SEP] identifier[addTerm] operator[SEP] identifier[Function] operator[SEP] identifier[create] operator[SEP] literal[String] , literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[engine] operator[SEP] identifier[addOutputVariable] operator[SEP] identifier[trueValue] operator[SEP] operator[SEP] identifier[OutputVariable] identifier[difference] operator[=] Keyword[new] identifier[OutputVariable] operator[SEP] operator[SEP] operator[SEP] identifier[difference] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[difference] operator[SEP] identifier[setDescription] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[difference] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[difference] operator[SEP] identifier[setRange] operator[SEP] operator[-] literal[Float] , literal[Float] operator[SEP] operator[SEP] identifier[difference] operator[SEP] identifier[setLockValueInRange] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[difference] operator[SEP] identifier[setAggregation] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[difference] operator[SEP] identifier[setDefuzzifier] operator[SEP] Keyword[new] identifier[WeightedAverage] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[difference] operator[SEP] identifier[setDefaultValue] operator[SEP] identifier[Double] operator[SEP] identifier[NaN] operator[SEP] operator[SEP] identifier[difference] operator[SEP] identifier[setLockPreviousValue] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[difference] operator[SEP] identifier[addTerm] operator[SEP] identifier[Function] operator[SEP] identifier[create] operator[SEP] literal[String] , literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[engine] operator[SEP] identifier[addOutputVariable] operator[SEP] identifier[difference] operator[SEP] operator[SEP] identifier[RuleBlock] identifier[ruleBlock] operator[=] Keyword[new] identifier[RuleBlock] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[setDescription] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[setConjunction] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[setDisjunction] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[setImplication] operator[SEP] Keyword[new] identifier[AlgebraicProduct] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[setActivation] operator[SEP] Keyword[new] identifier[General] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[addRule] operator[SEP] identifier[Rule] operator[SEP] identifier[parse] operator[SEP] literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[addRule] operator[SEP] identifier[Rule] operator[SEP] identifier[parse] operator[SEP] literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[addRule] operator[SEP] identifier[Rule] operator[SEP] identifier[parse] operator[SEP] literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[addRule] operator[SEP] identifier[Rule] operator[SEP] identifier[parse] operator[SEP] literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[addRule] operator[SEP] identifier[Rule] operator[SEP] identifier[parse] operator[SEP] literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[addRule] operator[SEP] identifier[Rule] operator[SEP] identifier[parse] operator[SEP] literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[addRule] operator[SEP] identifier[Rule] operator[SEP] identifier[parse] operator[SEP] literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[addRule] operator[SEP] identifier[Rule] operator[SEP] identifier[parse] operator[SEP] literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[addRule] operator[SEP] identifier[Rule] operator[SEP] identifier[parse] operator[SEP] literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[addRule] operator[SEP] identifier[Rule] operator[SEP] identifier[parse] operator[SEP] literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[engine] operator[SEP] identifier[addRuleBlock] operator[SEP] identifier[ruleBlock] operator[SEP] operator[SEP] Keyword[return] identifier[engine] operator[SEP]
}
|
public BigInteger step1(final String userID, final BigInteger s, final BigInteger v) {
// Check arguments
if (userID == null || userID.trim().isEmpty())
throw new IllegalArgumentException("The user identity 'I' must not be null or empty");
this.userID = userID;
if (s == null) throw new IllegalArgumentException("The salt 's' must not be null");
this.s = s;
if (v == null) throw new IllegalArgumentException("The verifier 'v' must not be null");
this.v = v;
// Check current state
if (state != State.INIT)
throw new IllegalStateException("State violation: Session must be in INIT state");
// Generate server private and public values
k = SRP6Routines.computeK(digest, config.N, config.g);
digest.reset();
b = HomekitSRP6Routines.generatePrivateValue(config.N, random);
digest.reset();
B = SRP6Routines.computePublicServerValue(config.N, config.g, k, v, b);
state = State.STEP_1;
updateLastActivityTime();
return B;
} | class class_name[name] begin[{]
method[step1, return_type[type[BigInteger]], modifier[public], parameter[userID, s, v]] begin[{]
if[binary_operation[binary_operation[member[.userID], ==, literal[null]], ||, call[userID.trim, parameter[]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The user identity 'I' must not be null or empty")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)
else begin[{]
None
end[}]
assign[THIS[member[None.userID]], member[.userID]]
if[binary_operation[member[.s], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The salt 's' must not be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)
else begin[{]
None
end[}]
assign[THIS[member[None.s]], member[.s]]
if[binary_operation[member[.v], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The verifier 'v' must not be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)
else begin[{]
None
end[}]
assign[THIS[member[None.v]], member[.v]]
if[binary_operation[member[.state], !=, member[State.INIT]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="State violation: Session must be in INIT state")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)
else begin[{]
None
end[}]
assign[member[.k], call[SRP6Routines.computeK, parameter[member[.digest], member[config.N], member[config.g]]]]
call[digest.reset, parameter[]]
assign[member[.b], call[HomekitSRP6Routines.generatePrivateValue, parameter[member[config.N], member[.random]]]]
call[digest.reset, parameter[]]
assign[member[.B], call[SRP6Routines.computePublicServerValue, parameter[member[config.N], member[config.g], member[.k], member[.v], member[.b]]]]
assign[member[.state], member[State.STEP_1]]
call[.updateLastActivityTime, parameter[]]
return[member[.B]]
end[}]
END[}] | Keyword[public] identifier[BigInteger] identifier[step1] operator[SEP] Keyword[final] identifier[String] identifier[userID] , Keyword[final] identifier[BigInteger] identifier[s] , Keyword[final] identifier[BigInteger] identifier[v] operator[SEP] {
Keyword[if] operator[SEP] identifier[userID] operator[==] Other[null] operator[||] identifier[userID] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[userID] operator[=] identifier[userID] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[s] operator[=] identifier[s] operator[SEP] Keyword[if] operator[SEP] identifier[v] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[v] operator[=] identifier[v] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[!=] identifier[State] operator[SEP] identifier[INIT] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[k] operator[=] identifier[SRP6Routines] operator[SEP] identifier[computeK] operator[SEP] identifier[digest] , identifier[config] operator[SEP] identifier[N] , identifier[config] operator[SEP] identifier[g] operator[SEP] operator[SEP] identifier[digest] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[b] operator[=] identifier[HomekitSRP6Routines] operator[SEP] identifier[generatePrivateValue] operator[SEP] identifier[config] operator[SEP] identifier[N] , identifier[random] operator[SEP] operator[SEP] identifier[digest] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[B] operator[=] identifier[SRP6Routines] operator[SEP] identifier[computePublicServerValue] operator[SEP] identifier[config] operator[SEP] identifier[N] , identifier[config] operator[SEP] identifier[g] , identifier[k] , identifier[v] , identifier[b] operator[SEP] operator[SEP] identifier[state] operator[=] identifier[State] operator[SEP] identifier[STEP_1] operator[SEP] identifier[updateLastActivityTime] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[B] operator[SEP]
}
|
public int getCarrierPort(String bucketName) {
Bucket bucket = buckets.get(bucketName);
if (null == bucket) {
// Buckets are created when the mock is started. Calling getCarrierPort()
// before the mock has been started makes no sense.
throw new RuntimeException("Bucket does not exist. Has the mock been started?");
}
return bucket.getCarrierPort();
} | class class_name[name] begin[{]
method[getCarrierPort, return_type[type[int]], modifier[public], parameter[bucketName]] begin[{]
local_variable[type[Bucket], bucket]
if[binary_operation[literal[null], ==, member[.bucket]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Bucket does not exist. Has the mock been started?")], 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[}]
return[call[bucket.getCarrierPort, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[int] identifier[getCarrierPort] operator[SEP] identifier[String] identifier[bucketName] operator[SEP] {
identifier[Bucket] identifier[bucket] operator[=] identifier[buckets] operator[SEP] identifier[get] operator[SEP] identifier[bucketName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[bucket] operator[SEP] {
Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[return] identifier[bucket] operator[SEP] identifier[getCarrierPort] operator[SEP] operator[SEP] operator[SEP]
}
|
public Integer getGroupIdFromName(String groupName) {
return (Integer) sqlService.getFromTable(Constants.GENERIC_ID, Constants.GROUPS_GROUP_NAME, groupName,
Constants.DB_TABLE_GROUPS);
} | class class_name[name] begin[{]
method[getGroupIdFromName, return_type[type[Integer]], modifier[public], parameter[groupName]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=GENERIC_ID, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), MemberReference(member=GROUPS_GROUP_NAME, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), MemberReference(member=groupName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=DB_TABLE_GROUPS, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=getFromTable, postfix_operators=[], prefix_operators=[], qualifier=sqlService, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))]
end[}]
END[}] | Keyword[public] identifier[Integer] identifier[getGroupIdFromName] operator[SEP] identifier[String] identifier[groupName] operator[SEP] {
Keyword[return] operator[SEP] identifier[Integer] operator[SEP] identifier[sqlService] operator[SEP] identifier[getFromTable] operator[SEP] identifier[Constants] operator[SEP] identifier[GENERIC_ID] , identifier[Constants] operator[SEP] identifier[GROUPS_GROUP_NAME] , identifier[groupName] , identifier[Constants] operator[SEP] identifier[DB_TABLE_GROUPS] operator[SEP] operator[SEP]
}
|
public static <T> List<Option<T>> createOptions(Collection<T> domainObjects) {
List<Option<T>> options = new ArrayList<Option<T>>();
for (T value : domainObjects) {
String id = String.valueOf(getId(value));
options.add(new Option<T>(id, value));
}
return options;
} | class class_name[name] begin[{]
method[createOptions, return_type[type[List]], modifier[public static], parameter[domainObjects]] begin[{]
local_variable[type[List], options]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), name=id)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, 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=T, sub_type=None))], dimensions=None, name=Option, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=options, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=domainObjects, 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=T, sub_type=None))), label=None)
return[member[.options]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[Option] operator[<] identifier[T] operator[>] operator[>] identifier[createOptions] operator[SEP] identifier[Collection] operator[<] identifier[T] operator[>] identifier[domainObjects] operator[SEP] {
identifier[List] operator[<] identifier[Option] operator[<] identifier[T] operator[>] operator[>] identifier[options] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Option] operator[<] identifier[T] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[T] identifier[value] operator[:] identifier[domainObjects] operator[SEP] {
identifier[String] identifier[id] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[getId] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] identifier[options] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Option] operator[<] identifier[T] operator[>] operator[SEP] identifier[id] , identifier[value] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] identifier[options] operator[SEP]
}
|
private static boolean isBmpHeader(final byte[] imageHeaderBytes, final int headerSize) {
if (headerSize < BMP_HEADER.length) {
return false;
}
return ImageFormatCheckerUtils.startsWithPattern(imageHeaderBytes, BMP_HEADER);
} | class class_name[name] begin[{]
method[isBmpHeader, return_type[type[boolean]], modifier[private static], parameter[imageHeaderBytes, headerSize]] begin[{]
if[binary_operation[member[.headerSize], <, member[BMP_HEADER.length]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
return[call[ImageFormatCheckerUtils.startsWithPattern, parameter[member[.imageHeaderBytes], member[.BMP_HEADER]]]]
end[}]
END[}] | Keyword[private] Keyword[static] Keyword[boolean] identifier[isBmpHeader] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[imageHeaderBytes] , Keyword[final] Keyword[int] identifier[headerSize] operator[SEP] {
Keyword[if] operator[SEP] identifier[headerSize] operator[<] identifier[BMP_HEADER] operator[SEP] identifier[length] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[return] identifier[ImageFormatCheckerUtils] operator[SEP] identifier[startsWithPattern] operator[SEP] identifier[imageHeaderBytes] , identifier[BMP_HEADER] operator[SEP] operator[SEP]
}
|
public SubscriptionBuilder subscription(String applicationName, String eventName) throws IOException {
return new SubscriptionBuilder(this, applicationName, Collections.singleton(eventName));
} | class class_name[name] begin[{]
method[subscription, return_type[type[SubscriptionBuilder]], modifier[public], parameter[applicationName, eventName]] begin[{]
return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=applicationName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=eventName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=singleton, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SubscriptionBuilder, sub_type=None))]
end[}]
END[}] | Keyword[public] identifier[SubscriptionBuilder] identifier[subscription] operator[SEP] identifier[String] identifier[applicationName] , identifier[String] identifier[eventName] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] Keyword[new] identifier[SubscriptionBuilder] operator[SEP] Keyword[this] , identifier[applicationName] , identifier[Collections] operator[SEP] identifier[singleton] operator[SEP] identifier[eventName] operator[SEP] operator[SEP] operator[SEP]
}
|
protected com.squareup.okhttp.Response interceptResponse(com.squareup.okhttp.Response response) {
return response;
} | class class_name[name] begin[{]
method[interceptResponse, return_type[type[com]], modifier[protected], parameter[response]] begin[{]
return[member[.response]]
end[}]
END[}] | Keyword[protected] identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Response] identifier[interceptResponse] operator[SEP] identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Response] identifier[response] operator[SEP] {
Keyword[return] identifier[response] operator[SEP]
}
|
@Override
public EEnum getIfcCostScheduleTypeEnum() {
if (ifcCostScheduleTypeEnumEEnum == null) {
ifcCostScheduleTypeEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(950);
}
return ifcCostScheduleTypeEnumEEnum;
} | class class_name[name] begin[{]
method[getIfcCostScheduleTypeEnum, return_type[type[EEnum]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcCostScheduleTypeEnumEEnum], ==, literal[null]]] begin[{]
assign[member[.ifcCostScheduleTypeEnumEEnum], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=950)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EEnum, sub_type=None))]
else begin[{]
None
end[}]
return[member[.ifcCostScheduleTypeEnumEEnum]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[EEnum] identifier[getIfcCostScheduleTypeEnum] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcCostScheduleTypeEnumEEnum] operator[==] Other[null] operator[SEP] {
identifier[ifcCostScheduleTypeEnumEEnum] operator[=] operator[SEP] identifier[EEnum] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[950] operator[SEP] operator[SEP]
}
Keyword[return] identifier[ifcCostScheduleTypeEnumEEnum] operator[SEP]
}
|
public void setScheduledWindowExecutions(java.util.Collection<ScheduledWindowExecution> scheduledWindowExecutions) {
if (scheduledWindowExecutions == null) {
this.scheduledWindowExecutions = null;
return;
}
this.scheduledWindowExecutions = new com.amazonaws.internal.SdkInternalList<ScheduledWindowExecution>(scheduledWindowExecutions);
} | class class_name[name] begin[{]
method[setScheduledWindowExecutions, return_type[void], modifier[public], parameter[scheduledWindowExecutions]] begin[{]
if[binary_operation[member[.scheduledWindowExecutions], ==, literal[null]]] begin[{]
assign[THIS[member[None.scheduledWindowExecutions]], literal[null]]
return[None]
else begin[{]
None
end[}]
assign[THIS[member[None.scheduledWindowExecutions]], ClassCreator(arguments=[MemberReference(member=scheduledWindowExecutions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ScheduledWindowExecution, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setScheduledWindowExecutions] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[ScheduledWindowExecution] operator[>] identifier[scheduledWindowExecutions] operator[SEP] {
Keyword[if] operator[SEP] identifier[scheduledWindowExecutions] operator[==] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identifier[scheduledWindowExecutions] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP]
}
Keyword[this] operator[SEP] identifier[scheduledWindowExecutions] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[ScheduledWindowExecution] operator[>] operator[SEP] identifier[scheduledWindowExecutions] operator[SEP] operator[SEP]
}
|
private void checkForMalformedCommandParameters(final List<String> messages) {
if (commandParams.isEmpty()) {
return;
}
final int CHANGESET_MINIMUM_IDENTIFIER_PARTS = 3;
if (COMMANDS.CALCULATE_CHECKSUM.equalsIgnoreCase(command)) {
for (final String param : commandParams) {
if ((param != null) && !param.startsWith("-")) {
final String[] parts = param.split("::");
if (parts.length < CHANGESET_MINIMUM_IDENTIFIER_PARTS) {
messages.add(coreBundle.getString("changeset.identifier.must.have.form.filepath.id.author"));
break;
}
}
}
} else if (COMMANDS.DIFF_CHANGELOG.equalsIgnoreCase(command) && (diffTypes != null) && diffTypes.toLowerCase
().contains("data")) {
messages.add(String.format(coreBundle.getString("including.data.diffchangelog.has.no.effect"),
OPTIONS.DIFF_TYPES, COMMANDS.GENERATE_CHANGELOG
));
}
} | class class_name[name] begin[{]
method[checkForMalformedCommandParameters, return_type[void], modifier[private], parameter[messages]] begin[{]
if[call[commandParams.isEmpty, parameter[]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[int], CHANGESET_MINIMUM_IDENTIFIER_PARTS]
if[call[COMMANDS.CALCULATE_CHECKSUM.equalsIgnoreCase, parameter[member[.command]]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="-")], member=startsWith, postfix_operators=[], prefix_operators=['!'], qualifier=param, selectors=[], type_arguments=None), 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="::")], member=split, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None), name=parts)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[]), operandr=MemberReference(member=CHANGESET_MINIMUM_IDENTIFIER_PARTS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="changeset.identifier.must.have.form.filepath.id.author")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=coreBundle, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=messages, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=commandParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=param)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)
else begin[{]
if[binary_operation[binary_operation[call[COMMANDS.DIFF_CHANGELOG.equalsIgnoreCase, parameter[member[.command]]], &&, binary_operation[member[.diffTypes], !=, literal[null]]], &&, call[diffTypes.toLowerCase, parameter[]]]] begin[{]
call[messages.add, parameter[call[String.format, parameter[call[coreBundle.getString, parameter[literal["including.data.diffchangelog.has.no.effect"]]], member[OPTIONS.DIFF_TYPES], member[COMMANDS.GENERATE_CHANGELOG]]]]]
else begin[{]
None
end[}]
end[}]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[checkForMalformedCommandParameters] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[messages] operator[SEP] {
Keyword[if] operator[SEP] identifier[commandParams] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP]
}
Keyword[final] Keyword[int] identifier[CHANGESET_MINIMUM_IDENTIFIER_PARTS] operator[=] Other[3] operator[SEP] Keyword[if] operator[SEP] identifier[COMMANDS] operator[SEP] identifier[CALCULATE_CHECKSUM] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[command] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[param] operator[:] identifier[commandParams] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[param] operator[!=] Other[null] operator[SEP] operator[&&] operator[!] identifier[param] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] {
Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[parts] operator[=] identifier[param] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parts] operator[SEP] identifier[length] operator[<] identifier[CHANGESET_MINIMUM_IDENTIFIER_PARTS] operator[SEP] {
identifier[messages] operator[SEP] identifier[add] operator[SEP] identifier[coreBundle] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP]
}
}
}
}
Keyword[else] Keyword[if] operator[SEP] identifier[COMMANDS] operator[SEP] identifier[DIFF_CHANGELOG] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[command] operator[SEP] operator[&&] operator[SEP] identifier[diffTypes] operator[!=] Other[null] operator[SEP] operator[&&] identifier[diffTypes] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] {
identifier[messages] operator[SEP] identifier[add] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[coreBundle] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] , identifier[OPTIONS] operator[SEP] identifier[DIFF_TYPES] , identifier[COMMANDS] operator[SEP] identifier[GENERATE_CHANGELOG] operator[SEP] operator[SEP] operator[SEP]
}
}
|
private void setPreemptiveAuth(FedoraHttpClient httpClient) {
this.localContext = new BasicHttpContext();
BasicScheme basicAuth = new BasicScheme();
localContext.setAttribute("preemptive-auth", basicAuth);
httpClient.addRequestInterceptor(new PreemptiveAuthInterceptor(), 0);
} | class class_name[name] begin[{]
method[setPreemptiveAuth, return_type[void], modifier[private], parameter[httpClient]] begin[{]
assign[THIS[member[None.localContext]], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BasicHttpContext, sub_type=None))]
local_variable[type[BasicScheme], basicAuth]
call[localContext.setAttribute, parameter[literal["preemptive-auth"], member[.basicAuth]]]
call[httpClient.addRequestInterceptor, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PreemptiveAuthInterceptor, sub_type=None)), literal[0]]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[setPreemptiveAuth] operator[SEP] identifier[FedoraHttpClient] identifier[httpClient] operator[SEP] {
Keyword[this] operator[SEP] identifier[localContext] operator[=] Keyword[new] identifier[BasicHttpContext] operator[SEP] operator[SEP] operator[SEP] identifier[BasicScheme] identifier[basicAuth] operator[=] Keyword[new] identifier[BasicScheme] operator[SEP] operator[SEP] operator[SEP] identifier[localContext] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[basicAuth] operator[SEP] operator[SEP] identifier[httpClient] operator[SEP] identifier[addRequestInterceptor] operator[SEP] Keyword[new] identifier[PreemptiveAuthInterceptor] operator[SEP] operator[SEP] , Other[0] operator[SEP] operator[SEP]
}
|
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
protected void initComponentsHandlers(
ChannelReplacements channelReplacements) {
handlers = new ArrayList<HandlerReference>();
// Have a look at all methods.
for (Method m : component().getClass().getMethods()) {
maybeAddHandler(m, channelReplacements);
}
handlers = Collections.synchronizedList(handlers);
} | class class_name[name] begin[{]
method[initComponentsHandlers, return_type[void], modifier[protected], parameter[channelReplacements]] begin[{]
assign[member[.handlers], 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=HandlerReference, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=channelReplacements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=maybeAddHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=component, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getMethods, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=m)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))), label=None)
assign[member[.handlers], call[Collections.synchronizedList, parameter[member[.handlers]]]]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[void] identifier[initComponentsHandlers] operator[SEP] identifier[ChannelReplacements] identifier[channelReplacements] operator[SEP] {
identifier[handlers] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[HandlerReference] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Method] identifier[m] operator[:] identifier[component] operator[SEP] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getMethods] operator[SEP] operator[SEP] operator[SEP] {
identifier[maybeAddHandler] operator[SEP] identifier[m] , identifier[channelReplacements] operator[SEP] operator[SEP]
}
identifier[handlers] operator[=] identifier[Collections] operator[SEP] identifier[synchronizedList] operator[SEP] identifier[handlers] operator[SEP] operator[SEP]
}
|
private void writePhysicalRecord(ByteBuffer data, Record record) {
writeBuffer.putInt(generateCrc(data.array(), data.position(), record.getBytes(),
record.getType()));
writeBuffer.putShort((short) record.getBytes());
writeBuffer.put(record.getType().value());
int oldLimit = data.limit();
data.limit(data.position() + record.getBytes());
writeBuffer.put(data);
data.limit(oldLimit);
} | class class_name[name] begin[{]
method[writePhysicalRecord, return_type[void], modifier[private], parameter[data, record]] begin[{]
call[writeBuffer.putInt, parameter[call[.generateCrc, parameter[call[data.array, parameter[]], call[data.position, parameter[]], call[record.getBytes, parameter[]], call[record.getType, parameter[]]]]]]
call[writeBuffer.putShort, parameter[Cast(expression=MethodInvocation(arguments=[], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=short))]]
call[writeBuffer.put, parameter[call[record.getType, parameter[]]]]
local_variable[type[int], oldLimit]
call[data.limit, parameter[binary_operation[call[data.position, parameter[]], +, call[record.getBytes, parameter[]]]]]
call[writeBuffer.put, parameter[member[.data]]]
call[data.limit, parameter[member[.oldLimit]]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[writePhysicalRecord] operator[SEP] identifier[ByteBuffer] identifier[data] , identifier[Record] identifier[record] operator[SEP] {
identifier[writeBuffer] operator[SEP] identifier[putInt] operator[SEP] identifier[generateCrc] operator[SEP] identifier[data] operator[SEP] identifier[array] operator[SEP] operator[SEP] , identifier[data] operator[SEP] identifier[position] operator[SEP] operator[SEP] , identifier[record] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] , identifier[record] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[writeBuffer] operator[SEP] identifier[putShort] operator[SEP] operator[SEP] Keyword[short] operator[SEP] identifier[record] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[writeBuffer] operator[SEP] identifier[put] operator[SEP] identifier[record] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[oldLimit] operator[=] identifier[data] operator[SEP] identifier[limit] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[limit] operator[SEP] identifier[data] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[+] identifier[record] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[writeBuffer] operator[SEP] identifier[put] operator[SEP] identifier[data] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[limit] operator[SEP] identifier[oldLimit] operator[SEP] operator[SEP]
}
|
public synchronized static void freeNamedLock(String name) {
int count = namedLockUseCounts.get(name);
if (count > 1) {
namedLockUseCounts.put(name, count - 1);
} else {
namedLocks.remove(name);
namedLockUseCounts.remove(name);
}
} | class class_name[name] begin[{]
method[freeNamedLock, return_type[void], modifier[synchronized public static], parameter[name]] begin[{]
local_variable[type[int], count]
if[binary_operation[member[.count], >, literal[1]]] begin[{]
call[namedLockUseCounts.put, parameter[member[.name], binary_operation[member[.count], -, literal[1]]]]
else begin[{]
call[namedLocks.remove, parameter[member[.name]]]
call[namedLockUseCounts.remove, parameter[member[.name]]]
end[}]
end[}]
END[}] | Keyword[public] Keyword[synchronized] Keyword[static] Keyword[void] identifier[freeNamedLock] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[int] identifier[count] operator[=] identifier[namedLockUseCounts] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[count] operator[>] Other[1] operator[SEP] {
identifier[namedLockUseCounts] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[count] operator[-] Other[1] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[namedLocks] operator[SEP] identifier[remove] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[namedLockUseCounts] operator[SEP] identifier[remove] operator[SEP] identifier[name] operator[SEP] operator[SEP]
}
}
|
public static FilterParams fromTuples(Object... tuples) {
StringValueMap map = StringValueMap.fromTuplesArray(tuples);
return new FilterParams(map);
} | class class_name[name] begin[{]
method[fromTuples, return_type[type[FilterParams]], modifier[public static], parameter[tuples]] begin[{]
local_variable[type[StringValueMap], map]
return[ClassCreator(arguments=[MemberReference(member=map, 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=FilterParams, sub_type=None))]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[FilterParams] identifier[fromTuples] operator[SEP] identifier[Object] operator[...] identifier[tuples] operator[SEP] {
identifier[StringValueMap] identifier[map] operator[=] identifier[StringValueMap] operator[SEP] identifier[fromTuplesArray] operator[SEP] identifier[tuples] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[FilterParams] operator[SEP] identifier[map] operator[SEP] operator[SEP]
}
|
private void moveRecords(Segment seg, ByteBuffer max, boolean deleteFromSource) {
checkWritesAllowed();
ByteBuffer from = seg.getMin();
ByteBuffer toExclusive = successor(max);
int batchSize = scanBatchSize();
Iterator<List<ByteBuffer>> batchIter = Iterators.partition(
_dao.scanRecords(seg.getDataId(), from, toExclusive, batchSize, Integer.MAX_VALUE),
batchSize);
while (batchIter.hasNext()) {
List<ByteBuffer> records = batchIter.next();
// Write to the destination. Go through addAll() to update stats, do splitting, etc.
addAll(records);
// Delete individual records from the source.
if (deleteFromSource) {
_dao.prepareUpdate(_name).deleteRecords(seg.getDataId(), records).execute();
}
}
seg.setMin(toExclusive);
} | class class_name[name] begin[{]
method[moveRecords, return_type[void], modifier[private], parameter[seg, max, deleteFromSource]] begin[{]
call[.checkWritesAllowed, parameter[]]
local_variable[type[ByteBuffer], from]
local_variable[type[ByteBuffer], toExclusive]
local_variable[type[int], batchSize]
local_variable[type[Iterator], batchIter]
while[call[batchIter.hasNext, parameter[]]] begin[{]
local_variable[type[List], records]
call[.addAll, parameter[member[.records]]]
if[member[.deleteFromSource]] begin[{]
call[_dao.prepareUpdate, parameter[member[._name]]]
else begin[{]
None
end[}]
end[}]
call[seg.setMin, parameter[member[.toExclusive]]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[moveRecords] operator[SEP] identifier[Segment] identifier[seg] , identifier[ByteBuffer] identifier[max] , Keyword[boolean] identifier[deleteFromSource] operator[SEP] {
identifier[checkWritesAllowed] operator[SEP] operator[SEP] operator[SEP] identifier[ByteBuffer] identifier[from] operator[=] identifier[seg] operator[SEP] identifier[getMin] operator[SEP] operator[SEP] operator[SEP] identifier[ByteBuffer] identifier[toExclusive] operator[=] identifier[successor] operator[SEP] identifier[max] operator[SEP] operator[SEP] Keyword[int] identifier[batchSize] operator[=] identifier[scanBatchSize] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[List] operator[<] identifier[ByteBuffer] operator[>] operator[>] identifier[batchIter] operator[=] identifier[Iterators] operator[SEP] identifier[partition] operator[SEP] identifier[_dao] operator[SEP] identifier[scanRecords] operator[SEP] identifier[seg] operator[SEP] identifier[getDataId] operator[SEP] operator[SEP] , identifier[from] , identifier[toExclusive] , identifier[batchSize] , identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] , identifier[batchSize] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[batchIter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[ByteBuffer] operator[>] identifier[records] operator[=] identifier[batchIter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[records] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[deleteFromSource] operator[SEP] {
identifier[_dao] operator[SEP] identifier[prepareUpdate] operator[SEP] identifier[_name] operator[SEP] operator[SEP] identifier[deleteRecords] operator[SEP] identifier[seg] operator[SEP] identifier[getDataId] operator[SEP] operator[SEP] , identifier[records] operator[SEP] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP]
}
}
identifier[seg] operator[SEP] identifier[setMin] operator[SEP] identifier[toExclusive] operator[SEP] operator[SEP]
}
|
public static <I extends ScoreIter> double computeDCG(Predicate<? super I> predicate, I iter) {
double sum = 0.;
int i = 0, positive = 0, tied = 0;
while(iter.valid()) {
// positive or negative match?
do {
if(predicate.test(iter)) {
++positive;
}
++tied;
++i;
iter.advance();
} // Loop while tied:
while(iter.valid() && iter.tiedToPrevious());
// We only support binary labeling, and can ignore negative weight.
if(positive > 0) {
sum += tied == 1 ? 1. / FastMath.log(i + 1) : //
DCGEvaluation.sumInvLog1p(i - tied + 1, i) * positive / (double) tied;
}
positive = 0;
tied = 0;
}
return sum * MathUtil.LOG2; // Change base to log 2.
} | class class_name[name] begin[{]
method[computeDCG, return_type[type[double]], modifier[public static], parameter[predicate, iter]] begin[{]
local_variable[type[double], sum]
local_variable[type[int], i]
while[call[iter.valid, parameter[]]] begin[{]
do[binary_operation[call[iter.valid, parameter[]], &&, call[iter.tiedToPrevious, parameter[]]]] begin[{]
if[call[predicate.test, parameter[member[.iter]]]] begin[{]
member[.positive]
else begin[{]
None
end[}]
member[.tied]
member[.i]
call[iter.advance, parameter[]]
end[}]
if[binary_operation[member[.positive], >, literal[0]]] begin[{]
assign[member[.sum], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=tied, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), if_false=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=tied, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sumInvLog1p, postfix_operators=[], prefix_operators=[], qualifier=DCGEvaluation, selectors=[], type_arguments=None), operandr=MemberReference(member=positive, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=Cast(expression=MemberReference(member=tied, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=double)), operator=/), if_true=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=log, postfix_operators=[], prefix_operators=[], qualifier=FastMath, selectors=[], type_arguments=None), operator=/))]
else begin[{]
None
end[}]
assign[member[.positive], literal[0]]
assign[member[.tied], literal[0]]
end[}]
return[binary_operation[member[.sum], *, member[MathUtil.LOG2]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[I] Keyword[extends] identifier[ScoreIter] operator[>] Keyword[double] identifier[computeDCG] operator[SEP] identifier[Predicate] operator[<] operator[?] Keyword[super] identifier[I] operator[>] identifier[predicate] , identifier[I] identifier[iter] operator[SEP] {
Keyword[double] identifier[sum] operator[=] literal[Float] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[positive] operator[=] Other[0] , identifier[tied] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[iter] operator[SEP] identifier[valid] operator[SEP] operator[SEP] operator[SEP] {
Keyword[do] {
Keyword[if] operator[SEP] identifier[predicate] operator[SEP] identifier[test] operator[SEP] identifier[iter] operator[SEP] operator[SEP] {
operator[++] identifier[positive] operator[SEP]
} operator[++] identifier[tied] operator[SEP] operator[++] identifier[i] operator[SEP] identifier[iter] operator[SEP] identifier[advance] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[while] operator[SEP] identifier[iter] operator[SEP] identifier[valid] operator[SEP] operator[SEP] operator[&&] identifier[iter] operator[SEP] identifier[tiedToPrevious] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[positive] operator[>] Other[0] operator[SEP] {
identifier[sum] operator[+=] identifier[tied] operator[==] Other[1] operator[?] literal[Float] operator[/] identifier[FastMath] operator[SEP] identifier[log] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[:] identifier[DCGEvaluation] operator[SEP] identifier[sumInvLog1p] operator[SEP] identifier[i] operator[-] identifier[tied] operator[+] Other[1] , identifier[i] operator[SEP] operator[*] identifier[positive] operator[/] operator[SEP] Keyword[double] operator[SEP] identifier[tied] operator[SEP]
}
identifier[positive] operator[=] Other[0] operator[SEP] identifier[tied] operator[=] Other[0] operator[SEP]
}
Keyword[return] identifier[sum] operator[*] identifier[MathUtil] operator[SEP] identifier[LOG2] operator[SEP]
}
|
private void twoWayMergeInternalStandard(final ReservoirLongsSketch source) {
assert (source.getN() <= source.getK());
final int numInputSamples = source.getNumSamples();
for (int i = 0; i < numInputSamples; ++i) {
gadget_.update(source.getValueAtPosition(i));
}
} | class class_name[name] begin[{]
method[twoWayMergeInternalStandard, return_type[void], modifier[private], parameter[source]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getN, postfix_operators=[], prefix_operators=[], qualifier=source, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getK, postfix_operators=[], prefix_operators=[], qualifier=source, selectors=[], type_arguments=None), operator=<=), label=None, value=None)
local_variable[type[int], numInputSamples]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getValueAtPosition, postfix_operators=[], prefix_operators=[], qualifier=source, selectors=[], type_arguments=None)], member=update, postfix_operators=[], prefix_operators=[], qualifier=gadget_, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numInputSamples, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None)
end[}]
END[}] | Keyword[private] Keyword[void] identifier[twoWayMergeInternalStandard] operator[SEP] Keyword[final] identifier[ReservoirLongsSketch] identifier[source] operator[SEP] {
Keyword[assert] operator[SEP] identifier[source] operator[SEP] identifier[getN] operator[SEP] operator[SEP] operator[<=] identifier[source] operator[SEP] identifier[getK] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[numInputSamples] operator[=] identifier[source] operator[SEP] identifier[getNumSamples] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numInputSamples] operator[SEP] operator[++] identifier[i] operator[SEP] {
identifier[gadget_] operator[SEP] identifier[update] operator[SEP] identifier[source] operator[SEP] identifier[getValueAtPosition] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP]
}
}
|
public static Optional<String> getFileName(final String aUrl) {
if (aUrl != null) {
int index = aUrl.lastIndexOf('/');
if (index > 0) {
final String file = aUrl.substring(index + 1);
if (file.contains(".")) {
return Optional.of(file);
}
}
}
return Optional.empty();
} | class class_name[name] begin[{]
method[getFileName, return_type[type[Optional]], modifier[public static], parameter[aUrl]] begin[{]
if[binary_operation[member[.aUrl], !=, literal[null]]] begin[{]
local_variable[type[int], index]
if[binary_operation[member[.index], >, literal[0]]] begin[{]
local_variable[type[String], file]
if[call[file.contains, parameter[literal["."]]]] begin[{]
return[call[Optional.of, parameter[member[.file]]]]
else begin[{]
None
end[}]
else begin[{]
None
end[}]
else begin[{]
None
end[}]
return[call[Optional.empty, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Optional] operator[<] identifier[String] operator[>] identifier[getFileName] operator[SEP] Keyword[final] identifier[String] identifier[aUrl] operator[SEP] {
Keyword[if] operator[SEP] identifier[aUrl] operator[!=] Other[null] operator[SEP] {
Keyword[int] identifier[index] operator[=] identifier[aUrl] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[>] Other[0] operator[SEP] {
Keyword[final] identifier[String] identifier[file] operator[=] identifier[aUrl] operator[SEP] identifier[substring] operator[SEP] identifier[index] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] {
Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[file] operator[SEP] operator[SEP]
}
}
}
Keyword[return] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP]
}
|
public List<String> values(String name) {
List<String> result = null;
for (int i = 0, size = size(); i < size; i++) {
if (name.equalsIgnoreCase(name(i))) {
if (result == null) result = new ArrayList<>(2);
result.add(value(i));
}
}
return result != null
? Collections.unmodifiableList(result)
: Collections.<String>emptyList();
} | class class_name[name] begin[{]
method[values, return_type[type[List]], modifier[public], parameter[name]] begin[{]
local_variable[type[List], result]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i), VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=size)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[], member=Collections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))]), if_true=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unmodifiableList, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None))]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[values] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[result] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[size] operator[=] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[size] operator[SEP] identifier[i] operator[++] operator[SEP] {
Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[name] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[return] identifier[result] operator[!=] Other[null] operator[?] identifier[Collections] operator[SEP] identifier[unmodifiableList] operator[SEP] identifier[result] operator[SEP] operator[:] identifier[Collections] operator[SEP] operator[<] identifier[String] operator[>] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP]
}
|
public static void writeConsoleNoDocType(Document ele, Writer out)
throws IOException {
XMLSerializer serializer =
new XMLSerializer(out, CONSOLE_NO_DOCTYPE);
serializer.serialize(ele);
} | class class_name[name] begin[{]
method[writeConsoleNoDocType, return_type[void], modifier[public static], parameter[ele, out]] begin[{]
local_variable[type[XMLSerializer], serializer]
call[serializer.serialize, parameter[member[.ele]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[writeConsoleNoDocType] operator[SEP] identifier[Document] identifier[ele] , identifier[Writer] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[XMLSerializer] identifier[serializer] operator[=] Keyword[new] identifier[XMLSerializer] operator[SEP] identifier[out] , identifier[CONSOLE_NO_DOCTYPE] operator[SEP] operator[SEP] identifier[serializer] operator[SEP] identifier[serialize] operator[SEP] identifier[ele] operator[SEP] operator[SEP]
}
|
private boolean vulnerabilitiesMatch(Dependency dependency1, Dependency dependency2) {
final Set<Vulnerability> one = dependency1.getVulnerabilities();
final Set<Vulnerability> two = dependency2.getVulnerabilities();
return one != null && two != null
&& one.size() == two.size()
&& one.containsAll(two);
} | class class_name[name] begin[{]
method[vulnerabilitiesMatch, return_type[type[boolean]], modifier[private], parameter[dependency1, dependency2]] begin[{]
local_variable[type[Set], one]
local_variable[type[Set], two]
return[binary_operation[binary_operation[binary_operation[binary_operation[member[.one], !=, literal[null]], &&, binary_operation[member[.two], !=, literal[null]]], &&, binary_operation[call[one.size, parameter[]], ==, call[two.size, parameter[]]]], &&, call[one.containsAll, parameter[member[.two]]]]]
end[}]
END[}] | Keyword[private] Keyword[boolean] identifier[vulnerabilitiesMatch] operator[SEP] identifier[Dependency] identifier[dependency1] , identifier[Dependency] identifier[dependency2] operator[SEP] {
Keyword[final] identifier[Set] operator[<] identifier[Vulnerability] operator[>] identifier[one] operator[=] identifier[dependency1] operator[SEP] identifier[getVulnerabilities] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Set] operator[<] identifier[Vulnerability] operator[>] identifier[two] operator[=] identifier[dependency2] operator[SEP] identifier[getVulnerabilities] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[one] operator[!=] Other[null] operator[&&] identifier[two] operator[!=] Other[null] operator[&&] identifier[one] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] identifier[two] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[&&] identifier[one] operator[SEP] identifier[containsAll] operator[SEP] identifier[two] operator[SEP] operator[SEP]
}
|
public static String simplifySingleParagraph(String html) {
html = html.trim();
String upper = html.toUpperCase();
if ( upper.startsWith("<P>") ) {
html = html.substring(3);
}
if ( upper.endsWith("</P>") ) {
html = html.substring(0, html.length() - 4);
}
return html;
} | class class_name[name] begin[{]
method[simplifySingleParagraph, return_type[type[String]], modifier[public static], parameter[html]] begin[{]
assign[member[.html], call[html.trim, parameter[]]]
local_variable[type[String], upper]
if[call[upper.startsWith, parameter[literal["<P>"]]]] begin[{]
assign[member[.html], call[html.substring, parameter[literal[3]]]]
else begin[{]
None
end[}]
if[call[upper.endsWith, parameter[literal["</P>"]]]] begin[{]
assign[member[.html], call[html.substring, parameter[literal[0], binary_operation[call[html.length, parameter[]], -, literal[4]]]]]
else begin[{]
None
end[}]
return[member[.html]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[simplifySingleParagraph] operator[SEP] identifier[String] identifier[html] operator[SEP] {
identifier[html] operator[=] identifier[html] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[upper] operator[=] identifier[html] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[upper] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] {
identifier[html] operator[=] identifier[html] operator[SEP] identifier[substring] operator[SEP] Other[3] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[upper] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] {
identifier[html] operator[=] identifier[html] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[html] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[4] operator[SEP] operator[SEP]
}
Keyword[return] identifier[html] operator[SEP]
}
|
protected void jfapSend(CommsByteBuffer buffer,
int sendSegType,
int priority,
boolean canPoolOnReceive,
ThrottlingPolicy throttlingPolicy)
throws SIConnectionDroppedException,
SIConnectionLostException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "jfapSend",
new Object[]{buffer, sendSegType, priority, canPoolOnReceive});
if (buffer == null)
{
// The data list cannot be null
SIErrorException e = new SIErrorException(
nls.getFormattedMessage("NULL_DATA_LIST_PASSED_IN_SICO1046", null, null)
);
FFDCFilter.processException(e, CLASS_NAME + ".JFAPSend",
CommsConstants.JFAPCOMMUNICATOR_SEND_01, this);
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, e.getMessage(), e);
throw e;
}
int reqNum = 0;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
{
SibTr.debug(this, tc, "About to Send segment "
+ "conversation: "+ con + " "
+ JFapChannelConstants.getSegmentName(sendSegType)
+ " - " + sendSegType
+ " (0x" + Integer.toHexString(sendSegType) + ") "
+ "using request number "
+ reqNum);
SibTr.debug(this, tc, con.getFullSummary());
}
con.send(buffer, sendSegType, reqNum, priority, canPoolOnReceive, throttlingPolicy, null);
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "jfapSend");
} | class class_name[name] begin[{]
method[jfapSend, return_type[void], modifier[protected], parameter[buffer, sendSegType, priority, canPoolOnReceive, throttlingPolicy]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[THIS[], member[.tc], literal["jfapSend"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sendSegType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=priority, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=canPoolOnReceive, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]]
else begin[{]
None
end[}]
if[binary_operation[member[.buffer], ==, literal[null]]] begin[{]
local_variable[type[SIErrorException], e]
call[FFDCFilter.processException, parameter[member[.e], binary_operation[member[.CLASS_NAME], +, literal[".JFAPSend"]], member[CommsConstants.JFAPCOMMUNICATOR_SEND_01], THIS[]]]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{]
call[SibTr.debug, parameter[member[.tc], call[e.getMessage, parameter[]], member[.e]]]
else begin[{]
None
end[}]
ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)
else begin[{]
None
end[}]
local_variable[type[int], reqNum]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{]
call[SibTr.debug, parameter[THIS[], member[.tc], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["About to Send segment "], +, literal["conversation: "]], +, member[.con]], +, literal[" "]], +, call[JFapChannelConstants.getSegmentName, parameter[member[.sendSegType]]]], +, literal[" - "]], +, member[.sendSegType]], +, literal[" (0x"]], +, call[Integer.toHexString, parameter[member[.sendSegType]]]], +, literal[") "]], +, literal["using request number "]], +, member[.reqNum]]]]
call[SibTr.debug, parameter[THIS[], member[.tc], call[con.getFullSummary, parameter[]]]]
else begin[{]
None
end[}]
call[con.send, parameter[member[.buffer], member[.sendSegType], member[.reqNum], member[.priority], member[.canPoolOnReceive], member[.throttlingPolicy], literal[null]]]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.exit, parameter[THIS[], member[.tc], literal["jfapSend"]]]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[jfapSend] operator[SEP] identifier[CommsByteBuffer] identifier[buffer] , Keyword[int] identifier[sendSegType] , Keyword[int] identifier[priority] , Keyword[boolean] identifier[canPoolOnReceive] , identifier[ThrottlingPolicy] identifier[throttlingPolicy] operator[SEP] Keyword[throws] identifier[SIConnectionDroppedException] , identifier[SIConnectionLostException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] {
identifier[buffer] , identifier[sendSegType] , identifier[priority] , identifier[canPoolOnReceive]
} operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[buffer] operator[==] Other[null] operator[SEP] {
identifier[SIErrorException] identifier[e] operator[=] Keyword[new] identifier[SIErrorException] operator[SEP] identifier[nls] operator[SEP] identifier[getFormattedMessage] operator[SEP] literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , identifier[CLASS_NAME] operator[+] literal[String] , identifier[CommsConstants] operator[SEP] identifier[JFAPCOMMUNICATOR_SEND_01] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP]
}
Keyword[int] identifier[reqNum] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] literal[String] operator[+] identifier[con] operator[+] literal[String] operator[+] identifier[JFapChannelConstants] operator[SEP] identifier[getSegmentName] operator[SEP] identifier[sendSegType] operator[SEP] operator[+] literal[String] operator[+] identifier[sendSegType] operator[+] literal[String] operator[+] identifier[Integer] operator[SEP] identifier[toHexString] operator[SEP] identifier[sendSegType] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[reqNum] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , identifier[con] operator[SEP] identifier[getFullSummary] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
identifier[con] operator[SEP] identifier[send] operator[SEP] identifier[buffer] , identifier[sendSegType] , identifier[reqNum] , identifier[priority] , identifier[canPoolOnReceive] , identifier[throttlingPolicy] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP]
}
|
public void out2out(String out, Object to, String to_out) {
controller.mapOut(out, to, to_out);
} | class class_name[name] begin[{]
method[out2out, return_type[void], modifier[public], parameter[out, to, to_out]] begin[{]
call[controller.mapOut, parameter[member[.out], member[.to], member[.to_out]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[out2out] operator[SEP] identifier[String] identifier[out] , identifier[Object] identifier[to] , identifier[String] identifier[to_out] operator[SEP] {
identifier[controller] operator[SEP] identifier[mapOut] operator[SEP] identifier[out] , identifier[to] , identifier[to_out] operator[SEP] operator[SEP]
}
|
private void drawTicks() {
double sinValue;
double cosValue;
double startAngle = 180;
double angleStep = 360 / 60;
Point2D center = new Point2D(size * 0.5, size * 0.5);
Color hourTickMarkColor = getSkinnable().getHourTickMarkColor();
Color minuteTickMarkColor = getSkinnable().getMinuteTickMarkColor();
boolean hourTickMarksVisible = getSkinnable().isHourTickMarksVisible();
boolean minuteTickMarksVisible = getSkinnable().isMinuteTickMarksVisible();
tickCtx.clearRect(0, 0, size, size);
tickCtx.setLineCap(StrokeLineCap.ROUND);
for (double angle = 0, counter = 0 ; Double.compare(counter, 59) <= 0 ; angle -= angleStep, counter++) {
sinValue = Math.sin(Math.toRadians(angle + startAngle));
cosValue = Math.cos(Math.toRadians(angle + startAngle));
Point2D innerPoint = new Point2D(center.getX() + size * 0.405 * sinValue, center.getY() + size * 0.405 * cosValue);
Point2D innerMinutePoint = new Point2D(center.getX() + size * 0.435 * sinValue, center.getY() + size * 0.435 * cosValue);
Point2D outerPoint = new Point2D(center.getX() + size * 0.465 * sinValue, center.getY() + size * 0.465 * cosValue);
if (counter % 5 == 0) {
// Draw hour tickmark
tickCtx.setStroke(hourTickMarkColor);
if (hourTickMarksVisible) {
tickCtx.setLineWidth(size * 0.01);
tickCtx.strokeLine(innerPoint.getX(), innerPoint.getY(), outerPoint.getX(), outerPoint.getY());
} else if (minuteTickMarksVisible) {
tickCtx.setLineWidth(size * 0.005);
tickCtx.strokeLine(innerMinutePoint.getX(), innerMinutePoint.getY(), outerPoint.getX(), outerPoint.getY());
}
} else if (counter % 1 == 0 && minuteTickMarksVisible) {
// Draw minute tickmark
tickCtx.setLineWidth(size * 0.005);
tickCtx.setStroke(minuteTickMarkColor);
tickCtx.strokeLine(innerMinutePoint.getX(), innerMinutePoint.getY(), outerPoint.getX(), outerPoint.getY());
}
}
} | class class_name[name] begin[{]
method[drawTicks, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[double], sinValue]
local_variable[type[double], cosValue]
local_variable[type[double], startAngle]
local_variable[type[double], angleStep]
local_variable[type[Point2D], center]
local_variable[type[Color], hourTickMarkColor]
local_variable[type[Color], minuteTickMarkColor]
local_variable[type[boolean], hourTickMarksVisible]
local_variable[type[boolean], minuteTickMarksVisible]
call[tickCtx.clearRect, parameter[literal[0], literal[0], member[.size], member[.size]]]
call[tickCtx.setLineCap, parameter[member[StrokeLineCap.ROUND]]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=angle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=startAngle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=toRadians, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)], member=sin, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cosValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=angle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=startAngle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=toRadians, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)], member=cos, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=center, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.405), operator=*), operandr=MemberReference(member=sinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+), BinaryOperation(operandl=MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=center, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.405), operator=*), operandr=MemberReference(member=cosValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Point2D, sub_type=None)), name=innerPoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point2D, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=center, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.435), operator=*), operandr=MemberReference(member=sinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+), BinaryOperation(operandl=MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=center, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.435), operator=*), operandr=MemberReference(member=cosValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Point2D, sub_type=None)), name=innerMinutePoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point2D, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=center, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.465), operator=*), operandr=MemberReference(member=sinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+), BinaryOperation(operandl=MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=center, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.465), operator=*), operandr=MemberReference(member=cosValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Point2D, sub_type=None)), name=outerPoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point2D, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=counter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), operator=%), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=counter, 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===), operandr=MemberReference(member=minuteTickMarksVisible, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.005), operator=*)], member=setLineWidth, postfix_operators=[], prefix_operators=[], qualifier=tickCtx, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=minuteTickMarkColor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStroke, postfix_operators=[], prefix_operators=[], qualifier=tickCtx, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=innerMinutePoint, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=innerMinutePoint, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=outerPoint, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=outerPoint, selectors=[], type_arguments=None)], member=strokeLine, postfix_operators=[], prefix_operators=[], qualifier=tickCtx, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hourTickMarkColor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStroke, postfix_operators=[], prefix_operators=[], qualifier=tickCtx, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=hourTickMarksVisible, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=IfStatement(condition=MemberReference(member=minuteTickMarksVisible, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.005), operator=*)], member=setLineWidth, postfix_operators=[], prefix_operators=[], qualifier=tickCtx, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=innerMinutePoint, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=innerMinutePoint, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=outerPoint, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=outerPoint, selectors=[], type_arguments=None)], member=strokeLine, postfix_operators=[], prefix_operators=[], qualifier=tickCtx, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.01), operator=*)], member=setLineWidth, postfix_operators=[], prefix_operators=[], qualifier=tickCtx, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=innerPoint, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=innerPoint, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=outerPoint, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=outerPoint, selectors=[], type_arguments=None)], member=strokeLine, postfix_operators=[], prefix_operators=[], qualifier=tickCtx, selectors=[], type_arguments=None), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=counter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=59)], member=compare, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=angle), VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=counter)], modifiers=set(), type=BasicType(dimensions=[], name=double)), update=[Assignment(expressionl=MemberReference(member=angle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=MemberReference(member=angleStep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=counter, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
end[}]
END[}] | Keyword[private] Keyword[void] identifier[drawTicks] operator[SEP] operator[SEP] {
Keyword[double] identifier[sinValue] operator[SEP] Keyword[double] identifier[cosValue] operator[SEP] Keyword[double] identifier[startAngle] operator[=] Other[180] operator[SEP] Keyword[double] identifier[angleStep] operator[=] Other[360] operator[/] Other[60] operator[SEP] identifier[Point2D] identifier[center] operator[=] Keyword[new] identifier[Point2D] operator[SEP] identifier[size] operator[*] literal[Float] , identifier[size] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[Color] identifier[hourTickMarkColor] operator[=] identifier[getSkinnable] operator[SEP] operator[SEP] operator[SEP] identifier[getHourTickMarkColor] operator[SEP] operator[SEP] operator[SEP] identifier[Color] identifier[minuteTickMarkColor] operator[=] identifier[getSkinnable] operator[SEP] operator[SEP] operator[SEP] identifier[getMinuteTickMarkColor] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[hourTickMarksVisible] operator[=] identifier[getSkinnable] operator[SEP] operator[SEP] operator[SEP] identifier[isHourTickMarksVisible] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[minuteTickMarksVisible] operator[=] identifier[getSkinnable] operator[SEP] operator[SEP] operator[SEP] identifier[isMinuteTickMarksVisible] operator[SEP] operator[SEP] operator[SEP] identifier[tickCtx] operator[SEP] identifier[clearRect] operator[SEP] Other[0] , Other[0] , identifier[size] , identifier[size] operator[SEP] operator[SEP] identifier[tickCtx] operator[SEP] identifier[setLineCap] operator[SEP] identifier[StrokeLineCap] operator[SEP] identifier[ROUND] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[double] identifier[angle] operator[=] Other[0] , identifier[counter] operator[=] Other[0] operator[SEP] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[counter] , Other[59] operator[SEP] operator[<=] Other[0] operator[SEP] identifier[angle] operator[-=] identifier[angleStep] , identifier[counter] operator[++] operator[SEP] {
identifier[sinValue] operator[=] identifier[Math] operator[SEP] identifier[sin] operator[SEP] identifier[Math] operator[SEP] identifier[toRadians] operator[SEP] identifier[angle] operator[+] identifier[startAngle] operator[SEP] operator[SEP] operator[SEP] identifier[cosValue] operator[=] identifier[Math] operator[SEP] identifier[cos] operator[SEP] identifier[Math] operator[SEP] identifier[toRadians] operator[SEP] identifier[angle] operator[+] identifier[startAngle] operator[SEP] operator[SEP] operator[SEP] identifier[Point2D] identifier[innerPoint] operator[=] Keyword[new] identifier[Point2D] operator[SEP] identifier[center] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[+] identifier[size] operator[*] literal[Float] operator[*] identifier[sinValue] , identifier[center] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[+] identifier[size] operator[*] literal[Float] operator[*] identifier[cosValue] operator[SEP] operator[SEP] identifier[Point2D] identifier[innerMinutePoint] operator[=] Keyword[new] identifier[Point2D] operator[SEP] identifier[center] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[+] identifier[size] operator[*] literal[Float] operator[*] identifier[sinValue] , identifier[center] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[+] identifier[size] operator[*] literal[Float] operator[*] identifier[cosValue] operator[SEP] operator[SEP] identifier[Point2D] identifier[outerPoint] operator[=] Keyword[new] identifier[Point2D] operator[SEP] identifier[center] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[+] identifier[size] operator[*] literal[Float] operator[*] identifier[sinValue] , identifier[center] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[+] identifier[size] operator[*] literal[Float] operator[*] identifier[cosValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[counter] operator[%] Other[5] operator[==] Other[0] operator[SEP] {
identifier[tickCtx] operator[SEP] identifier[setStroke] operator[SEP] identifier[hourTickMarkColor] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hourTickMarksVisible] operator[SEP] {
identifier[tickCtx] operator[SEP] identifier[setLineWidth] operator[SEP] identifier[size] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[tickCtx] operator[SEP] identifier[strokeLine] operator[SEP] identifier[innerPoint] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[innerPoint] operator[SEP] identifier[getY] operator[SEP] operator[SEP] , identifier[outerPoint] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[outerPoint] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[minuteTickMarksVisible] operator[SEP] {
identifier[tickCtx] operator[SEP] identifier[setLineWidth] operator[SEP] identifier[size] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[tickCtx] operator[SEP] identifier[strokeLine] operator[SEP] identifier[innerMinutePoint] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[innerMinutePoint] operator[SEP] identifier[getY] operator[SEP] operator[SEP] , identifier[outerPoint] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[outerPoint] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[else] Keyword[if] operator[SEP] identifier[counter] operator[%] Other[1] operator[==] Other[0] operator[&&] identifier[minuteTickMarksVisible] operator[SEP] {
identifier[tickCtx] operator[SEP] identifier[setLineWidth] operator[SEP] identifier[size] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[tickCtx] operator[SEP] identifier[setStroke] operator[SEP] identifier[minuteTickMarkColor] operator[SEP] operator[SEP] identifier[tickCtx] operator[SEP] identifier[strokeLine] operator[SEP] identifier[innerMinutePoint] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[innerMinutePoint] operator[SEP] identifier[getY] operator[SEP] operator[SEP] , identifier[outerPoint] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[outerPoint] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
}
|
@Override
public Builder claimFrom(String jsonOrJwt, String claim) throws InvalidClaimException, InvalidTokenException {
if (JwtUtils.isNullEmpty(claim)) {
String err = Tr.formatMessage(tc, "JWT_INVALID_CLAIM_ERR", new Object[] { claim });
throw new InvalidClaimException(err);
}
if (isValidToken(jsonOrJwt)) {
String decoded = jsonOrJwt;
if (JwtUtils.isBase64Encoded(jsonOrJwt)) {
decoded = JwtUtils.decodeFromBase64String(jsonOrJwt);
}
boolean isJson = JwtUtils.isJson(decoded);
if (!isJson) {
String jwtPayload = JwtUtils.getPayload(jsonOrJwt);
decoded = JwtUtils.decodeFromBase64String(jwtPayload);
}
// } else {
// // either decoded payload from jwt or encoded/decoded json string
// if (JwtUtils.isBase64Encoded(jsonOrJwt)) {
// decoded = JwtUtils.decodeFromBase64String(jsonOrJwt);
// }
// }
if (decoded != null) {
Object claimValue = null;
try {
if ((claimValue = JwtUtils.claimFromJsonObject(decoded, claim)) != null) {
claims.put(claim, claimValue);
}
} catch (JoseException e) {
String err = Tr.formatMessage(tc, "JWT_INVALID_TOKEN_ERR");
throw new InvalidTokenException(err);
}
}
}
return this;
} | class class_name[name] begin[{]
method[claimFrom, return_type[type[Builder]], modifier[public], parameter[jsonOrJwt, claim]] begin[{]
if[call[JwtUtils.isNullEmpty, parameter[member[.claim]]]] begin[{]
local_variable[type[String], err]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=err, 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=InvalidClaimException, sub_type=None)), label=None)
else begin[{]
None
end[}]
if[call[.isValidToken, parameter[member[.jsonOrJwt]]]] begin[{]
local_variable[type[String], decoded]
if[call[JwtUtils.isBase64Encoded, parameter[member[.jsonOrJwt]]]] begin[{]
assign[member[.decoded], call[JwtUtils.decodeFromBase64String, parameter[member[.jsonOrJwt]]]]
else begin[{]
None
end[}]
local_variable[type[boolean], isJson]
if[member[.isJson]] begin[{]
local_variable[type[String], jwtPayload]
assign[member[.decoded], call[JwtUtils.decodeFromBase64String, parameter[member[.jwtPayload]]]]
else begin[{]
None
end[}]
if[binary_operation[member[.decoded], !=, literal[null]]] begin[{]
local_variable[type[Object], claimValue]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=claimValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=decoded, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=claim, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=claimFromJsonObject, postfix_operators=[], prefix_operators=[], qualifier=JwtUtils, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=claim, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=claimValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=claims, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="JWT_INVALID_TOKEN_ERR")], member=formatMessage, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), name=err)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=err, 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=InvalidTokenException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JoseException']))], finally_block=None, label=None, resources=None)
else begin[{]
None
end[}]
else begin[{]
None
end[}]
return[THIS[]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Builder] identifier[claimFrom] operator[SEP] identifier[String] identifier[jsonOrJwt] , identifier[String] identifier[claim] operator[SEP] Keyword[throws] identifier[InvalidClaimException] , identifier[InvalidTokenException] {
Keyword[if] operator[SEP] identifier[JwtUtils] operator[SEP] identifier[isNullEmpty] operator[SEP] identifier[claim] operator[SEP] operator[SEP] {
identifier[String] identifier[err] operator[=] identifier[Tr] operator[SEP] identifier[formatMessage] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] {
identifier[claim]
} operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[InvalidClaimException] operator[SEP] identifier[err] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[isValidToken] operator[SEP] identifier[jsonOrJwt] operator[SEP] operator[SEP] {
identifier[String] identifier[decoded] operator[=] identifier[jsonOrJwt] operator[SEP] Keyword[if] operator[SEP] identifier[JwtUtils] operator[SEP] identifier[isBase64Encoded] operator[SEP] identifier[jsonOrJwt] operator[SEP] operator[SEP] {
identifier[decoded] operator[=] identifier[JwtUtils] operator[SEP] identifier[decodeFromBase64String] operator[SEP] identifier[jsonOrJwt] operator[SEP] operator[SEP]
}
Keyword[boolean] identifier[isJson] operator[=] identifier[JwtUtils] operator[SEP] identifier[isJson] operator[SEP] identifier[decoded] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isJson] operator[SEP] {
identifier[String] identifier[jwtPayload] operator[=] identifier[JwtUtils] operator[SEP] identifier[getPayload] operator[SEP] identifier[jsonOrJwt] operator[SEP] operator[SEP] identifier[decoded] operator[=] identifier[JwtUtils] operator[SEP] identifier[decodeFromBase64String] operator[SEP] identifier[jwtPayload] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[decoded] operator[!=] Other[null] operator[SEP] {
identifier[Object] identifier[claimValue] operator[=] Other[null] operator[SEP] Keyword[try] {
Keyword[if] operator[SEP] operator[SEP] identifier[claimValue] operator[=] identifier[JwtUtils] operator[SEP] identifier[claimFromJsonObject] operator[SEP] identifier[decoded] , identifier[claim] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] {
identifier[claims] operator[SEP] identifier[put] operator[SEP] identifier[claim] , identifier[claimValue] operator[SEP] operator[SEP]
}
}
Keyword[catch] operator[SEP] identifier[JoseException] identifier[e] operator[SEP] {
identifier[String] identifier[err] operator[=] identifier[Tr] operator[SEP] identifier[formatMessage] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[InvalidTokenException] operator[SEP] identifier[err] operator[SEP] operator[SEP]
}
}
}
Keyword[return] Keyword[this] operator[SEP]
}
|
public static long distanceSquared(int x1, int y1, int z1, int x2, int y2, int z2) {
int dx = x1 - x2;
int dy = y1 - y2;
int dz = z1 - z2;
return dx * dx + dy * dy + dz * dz;
} | class class_name[name] begin[{]
method[distanceSquared, return_type[type[long]], modifier[public static], parameter[x1, y1, z1, x2, y2, z2]] begin[{]
local_variable[type[int], dx]
local_variable[type[int], dy]
local_variable[type[int], dz]
return[binary_operation[binary_operation[binary_operation[member[.dx], *, member[.dx]], +, binary_operation[member[.dy], *, member[.dy]]], +, binary_operation[member[.dz], *, member[.dz]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[long] identifier[distanceSquared] operator[SEP] Keyword[int] identifier[x1] , Keyword[int] identifier[y1] , Keyword[int] identifier[z1] , Keyword[int] identifier[x2] , Keyword[int] identifier[y2] , Keyword[int] identifier[z2] operator[SEP] {
Keyword[int] identifier[dx] operator[=] identifier[x1] operator[-] identifier[x2] operator[SEP] Keyword[int] identifier[dy] operator[=] identifier[y1] operator[-] identifier[y2] operator[SEP] Keyword[int] identifier[dz] operator[=] identifier[z1] operator[-] identifier[z2] operator[SEP] Keyword[return] identifier[dx] operator[*] identifier[dx] operator[+] identifier[dy] operator[*] identifier[dy] operator[+] identifier[dz] operator[*] identifier[dz] operator[SEP]
}
|
@Override
public WildcardStreamLocator newWildcardStreamLocator() {
return new JarWildcardStreamLocator() {
@Override
public boolean hasWildcard(final String uri) {
return isEnableWildcards() && super.hasWildcard(uri);
}
};
} | class class_name[name] begin[{]
method[newWildcardStreamLocator, return_type[type[WildcardStreamLocator]], modifier[public], parameter[]] begin[{]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isEnableWildcards, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=SuperMethodInvocation(arguments=[MemberReference(member=uri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasWildcard, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), operator=&&), label=None)], documentation=None, modifiers={'public'}, name=hasWildcard, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=uri, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JarWildcardStreamLocator, sub_type=None))]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[WildcardStreamLocator] identifier[newWildcardStreamLocator] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[JarWildcardStreamLocator] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[hasWildcard] operator[SEP] Keyword[final] identifier[String] identifier[uri] operator[SEP] {
Keyword[return] identifier[isEnableWildcards] operator[SEP] operator[SEP] operator[&&] Keyword[super] operator[SEP] identifier[hasWildcard] operator[SEP] identifier[uri] operator[SEP] operator[SEP]
}
} operator[SEP]
}
|
int addConstantNameAndType(final String name, final String descriptor) {
final int tag = Symbol.CONSTANT_NAME_AND_TYPE_TAG;
int hashCode = hash(tag, name, descriptor);
Entry entry = get(hashCode);
while (entry != null) {
if (entry.tag == tag
&& entry.hashCode == hashCode
&& entry.name.equals(name)
&& entry.value.equals(descriptor)) {
return entry.index;
}
entry = entry.next;
}
constantPool.put122(tag, addConstantUtf8(name), addConstantUtf8(descriptor));
return put(new Entry(constantPoolCount++, tag, name, descriptor, hashCode)).index;
} | class class_name[name] begin[{]
method[addConstantNameAndType, return_type[type[int]], modifier[default], parameter[name, descriptor]] begin[{]
local_variable[type[int], tag]
local_variable[type[int], hashCode]
local_variable[type[Entry], entry]
while[binary_operation[member[.entry], !=, literal[null]]] begin[{]
if[binary_operation[binary_operation[binary_operation[binary_operation[member[entry.tag], ==, member[.tag]], &&, binary_operation[member[entry.hashCode], ==, member[.hashCode]]], &&, call[entry.name.equals, parameter[member[.name]]]], &&, call[entry.value.equals, parameter[member[.descriptor]]]]] begin[{]
return[member[entry.index]]
else begin[{]
None
end[}]
assign[member[.entry], member[entry.next]]
end[}]
call[constantPool.put122, parameter[member[.tag], call[.addConstantUtf8, parameter[member[.name]]], call[.addConstantUtf8, parameter[member[.descriptor]]]]]
return[call[.put, parameter[ClassCreator(arguments=[MemberReference(member=constantPoolCount, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=descriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=hashCode, 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=Entry, sub_type=None))]]]
end[}]
END[}] | Keyword[int] identifier[addConstantNameAndType] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[descriptor] operator[SEP] {
Keyword[final] Keyword[int] identifier[tag] operator[=] identifier[Symbol] operator[SEP] identifier[CONSTANT_NAME_AND_TYPE_TAG] operator[SEP] Keyword[int] identifier[hashCode] operator[=] identifier[hash] operator[SEP] identifier[tag] , identifier[name] , identifier[descriptor] operator[SEP] operator[SEP] identifier[Entry] identifier[entry] operator[=] identifier[get] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[entry] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[tag] operator[==] identifier[tag] operator[&&] identifier[entry] operator[SEP] identifier[hashCode] operator[==] identifier[hashCode] operator[&&] identifier[entry] operator[SEP] identifier[name] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[&&] identifier[entry] operator[SEP] identifier[value] operator[SEP] identifier[equals] operator[SEP] identifier[descriptor] operator[SEP] operator[SEP] {
Keyword[return] identifier[entry] operator[SEP] identifier[index] operator[SEP]
}
identifier[entry] operator[=] identifier[entry] operator[SEP] identifier[next] operator[SEP]
}
identifier[constantPool] operator[SEP] identifier[put122] operator[SEP] identifier[tag] , identifier[addConstantUtf8] operator[SEP] identifier[name] operator[SEP] , identifier[addConstantUtf8] operator[SEP] identifier[descriptor] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[put] operator[SEP] Keyword[new] identifier[Entry] operator[SEP] identifier[constantPoolCount] operator[++] , identifier[tag] , identifier[name] , identifier[descriptor] , identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] identifier[index] operator[SEP]
}
|
public ApiResponse<Void> authKeepAliveWithHttpInfo() throws ApiException {
com.squareup.okhttp.Call call = authKeepAliveValidateBeforeCall(null, null);
return apiClient.execute(call);
} | class class_name[name] begin[{]
method[authKeepAliveWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[]] begin[{]
local_variable[type[com], call]
return[call[apiClient.execute, parameter[member[.call]]]]
end[}]
END[}] | Keyword[public] identifier[ApiResponse] operator[<] identifier[Void] operator[>] identifier[authKeepAliveWithHttpInfo] operator[SEP] operator[SEP] Keyword[throws] identifier[ApiException] {
identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[authKeepAliveValidateBeforeCall] operator[SEP] Other[null] , Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[apiClient] operator[SEP] identifier[execute] operator[SEP] identifier[call] operator[SEP] operator[SEP]
}
|
public BytesWritableToken visitBytesWritable(EditsElement e) throws IOException {
return (BytesWritableToken)visit(tokenizer.read(new BytesWritableToken(e)));
} | class class_name[name] begin[{]
method[visitBytesWritable, return_type[type[BytesWritableToken]], modifier[public], parameter[e]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[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=BytesWritableToken, sub_type=None))], member=read, postfix_operators=[], prefix_operators=[], qualifier=tokenizer, selectors=[], type_arguments=None)], member=visit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=BytesWritableToken, sub_type=None))]
end[}]
END[}] | Keyword[public] identifier[BytesWritableToken] identifier[visitBytesWritable] operator[SEP] identifier[EditsElement] identifier[e] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] operator[SEP] identifier[BytesWritableToken] operator[SEP] identifier[visit] operator[SEP] identifier[tokenizer] operator[SEP] identifier[read] operator[SEP] Keyword[new] identifier[BytesWritableToken] operator[SEP] identifier[e] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
|
@SuppressWarnings("fallthrough")
private void getAggregatedMetrics(List<MetricTimeRangeValue> metricValue,
long startTime, long endTime, long bucketId,
MetricsFilter.MetricAggregationType type,
MetricGranularity granularity) {
LOG.fine("getAggregatedMetrics " + startTime + " " + endTime);
// per request
long outterCountAvg = 0;
// prepare range value
long outterStartTime = Long.MAX_VALUE;
long outterEndTime = 0;
String outterValue = null;
double outterResult = 0;
Long startKey = cacheMetric.floorKey(startTime);
for (Long key = startKey != null ? startKey : cacheMetric.firstKey();
key != null && key <= endTime;
key = cacheMetric.higherKey(key)) {
LinkedList<MetricDatapoint> bucket = cacheMetric.get(key).get(bucketId);
if (bucket != null) {
// per bucket
long innerCountAvg = 0;
// prepare range value
long innerStartTime = Long.MAX_VALUE;
long innerEndTime = 0;
String innerValue = null;
double innerResult = 0;
for (MetricDatapoint datapoint : bucket) {
if (datapoint.inRange(startTime, endTime)) {
switch (type) {
case AVG:
outterCountAvg++;
innerCountAvg++;
case SUM:
outterResult += Double.parseDouble(datapoint.getValue());
innerResult += Double.parseDouble(datapoint.getValue());
break;
case LAST:
if (outterEndTime < datapoint.getTimestamp()) {
outterValue = datapoint.getValue();
}
if (innerEndTime < datapoint.getTimestamp()) {
innerValue = datapoint.getValue();
}
break;
case UNKNOWN:
default:
LOG.warning(
"Unknown metric type, CacheCore does not know how to aggregate " + type);
return;
}
outterStartTime = Math.min(outterStartTime, datapoint.getTimestamp());
outterEndTime = Math.max(outterEndTime, datapoint.getTimestamp());
innerStartTime = Math.min(innerStartTime, datapoint.getTimestamp());
innerEndTime = Math.max(innerEndTime, datapoint.getTimestamp());
}
} // end bucket
if (type.equals(MetricsFilter.MetricAggregationType.AVG) && innerCountAvg > 0) {
innerValue = String.valueOf(innerResult / innerCountAvg);
} else if (type.equals(MetricsFilter.MetricAggregationType.SUM)) {
innerValue = String.valueOf(innerResult);
}
if (innerValue != null && granularity.equals(MetricGranularity.AGGREGATE_BY_BUCKET)) {
metricValue.add(new MetricTimeRangeValue(innerStartTime, innerEndTime, innerValue));
}
}
} // end tree
if (type.equals(MetricsFilter.MetricAggregationType.AVG) && outterCountAvg > 0) {
outterValue = String.valueOf(outterResult / outterCountAvg);
} else if (type.equals(MetricsFilter.MetricAggregationType.SUM)) {
outterValue = String.valueOf(outterResult);
}
if (outterValue != null && granularity.equals(MetricGranularity.AGGREGATE_ALL_METRICS)) {
metricValue.add(new MetricTimeRangeValue(outterStartTime, outterEndTime, outterValue));
}
} | class class_name[name] begin[{]
method[getAggregatedMetrics, return_type[void], modifier[private], parameter[metricValue, startTime, endTime, bucketId, type, granularity]] begin[{]
call[LOG.fine, parameter[binary_operation[binary_operation[binary_operation[literal["getAggregatedMetrics "], +, member[.startTime]], +, literal[" "]], +, member[.endTime]]]]
local_variable[type[long], outterCountAvg]
local_variable[type[long], outterStartTime]
local_variable[type[long], outterEndTime]
local_variable[type[String], outterValue]
local_variable[type[double], outterResult]
local_variable[type[Long], startKey]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=cacheMetric, selectors=[MethodInvocation(arguments=[MemberReference(member=bucketId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=bucket)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MetricDatapoint, sub_type=None))], dimensions=[], name=LinkedList, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=bucket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=innerCountAvg)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[]), name=innerStartTime)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=innerEndTime)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=innerValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=innerResult)], modifiers=set(), type=BasicType(dimensions=[], name=double)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=startTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=endTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=inRange, postfix_operators=[], prefix_operators=[], qualifier=datapoint, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[SwitchStatement(cases=[SwitchStatementCase(case=['AVG'], statements=[StatementExpression(expression=MemberReference(member=outterCountAvg, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MemberReference(member=innerCountAvg, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), SwitchStatementCase(case=['SUM'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outterResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=datapoint, selectors=[], type_arguments=None)], member=parseDouble, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=innerResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=datapoint, selectors=[], type_arguments=None)], member=parseDouble, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['LAST'], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=outterEndTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getTimestamp, postfix_operators=[], prefix_operators=[], qualifier=datapoint, selectors=[], type_arguments=None), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outterValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=datapoint, selectors=[], type_arguments=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=innerEndTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getTimestamp, postfix_operators=[], prefix_operators=[], qualifier=datapoint, selectors=[], type_arguments=None), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=innerValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=datapoint, selectors=[], type_arguments=None)), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['UNKNOWN'], statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown metric type, CacheCore does not know how to aggregate "), operandr=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=warning, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])], expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=outterStartTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=outterStartTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getTimestamp, postfix_operators=[], prefix_operators=[], qualifier=datapoint, selectors=[], type_arguments=None)], member=min, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=outterEndTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=outterEndTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getTimestamp, postfix_operators=[], prefix_operators=[], qualifier=datapoint, selectors=[], type_arguments=None)], member=max, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=innerStartTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=innerStartTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getTimestamp, postfix_operators=[], prefix_operators=[], qualifier=datapoint, selectors=[], type_arguments=None)], member=min, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=innerEndTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=innerEndTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getTimestamp, postfix_operators=[], prefix_operators=[], qualifier=datapoint, selectors=[], type_arguments=None)], member=max, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=bucket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=datapoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MetricDatapoint, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=AVG, postfix_operators=[], prefix_operators=[], qualifier=MetricsFilter.MetricAggregationType, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=innerCountAvg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=SUM, postfix_operators=[], prefix_operators=[], qualifier=MetricsFilter.MetricAggregationType, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=innerValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=innerResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=innerValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=innerResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=innerCountAvg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=innerValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=AGGREGATE_BY_BUCKET, postfix_operators=[], prefix_operators=[], qualifier=MetricGranularity, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=granularity, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=innerStartTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=innerEndTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=innerValue, 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=MetricTimeRangeValue, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=metricValue, selectors=[], type_arguments=None), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=endTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=startKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[], member=firstKey, postfix_operators=[], prefix_operators=[], qualifier=cacheMetric, selectors=[], type_arguments=None), if_true=MemberReference(member=startKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None)), update=[Assignment(expressionl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=higherKey, postfix_operators=[], prefix_operators=[], qualifier=cacheMetric, selectors=[], type_arguments=None))]), label=None)
if[binary_operation[call[type.equals, parameter[member[MetricsFilter.MetricAggregationType.AVG]]], &&, binary_operation[member[.outterCountAvg], >, literal[0]]]] begin[{]
assign[member[.outterValue], call[String.valueOf, parameter[binary_operation[member[.outterResult], /, member[.outterCountAvg]]]]]
else begin[{]
if[call[type.equals, parameter[member[MetricsFilter.MetricAggregationType.SUM]]]] begin[{]
assign[member[.outterValue], call[String.valueOf, parameter[member[.outterResult]]]]
else begin[{]
None
end[}]
end[}]
if[binary_operation[binary_operation[member[.outterValue], !=, literal[null]], &&, call[granularity.equals, parameter[member[MetricGranularity.AGGREGATE_ALL_METRICS]]]]] begin[{]
call[metricValue.add, parameter[ClassCreator(arguments=[MemberReference(member=outterStartTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=outterEndTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=outterValue, 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=MetricTimeRangeValue, sub_type=None))]]
else begin[{]
None
end[}]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[getAggregatedMetrics] operator[SEP] identifier[List] operator[<] identifier[MetricTimeRangeValue] operator[>] identifier[metricValue] , Keyword[long] identifier[startTime] , Keyword[long] identifier[endTime] , Keyword[long] identifier[bucketId] , identifier[MetricsFilter] operator[SEP] identifier[MetricAggregationType] identifier[type] , identifier[MetricGranularity] identifier[granularity] operator[SEP] {
identifier[LOG] operator[SEP] identifier[fine] operator[SEP] literal[String] operator[+] identifier[startTime] operator[+] literal[String] operator[+] identifier[endTime] operator[SEP] operator[SEP] Keyword[long] identifier[outterCountAvg] operator[=] Other[0] operator[SEP] Keyword[long] identifier[outterStartTime] operator[=] identifier[Long] operator[SEP] identifier[MAX_VALUE] operator[SEP] Keyword[long] identifier[outterEndTime] operator[=] Other[0] operator[SEP] identifier[String] identifier[outterValue] operator[=] Other[null] operator[SEP] Keyword[double] identifier[outterResult] operator[=] Other[0] operator[SEP] identifier[Long] identifier[startKey] operator[=] identifier[cacheMetric] operator[SEP] identifier[floorKey] operator[SEP] identifier[startTime] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Long] identifier[key] operator[=] identifier[startKey] operator[!=] Other[null] operator[?] identifier[startKey] operator[:] identifier[cacheMetric] operator[SEP] identifier[firstKey] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[!=] Other[null] operator[&&] identifier[key] operator[<=] identifier[endTime] operator[SEP] identifier[key] operator[=] identifier[cacheMetric] operator[SEP] identifier[higherKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] {
identifier[LinkedList] operator[<] identifier[MetricDatapoint] operator[>] identifier[bucket] operator[=] identifier[cacheMetric] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[bucketId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bucket] operator[!=] Other[null] operator[SEP] {
Keyword[long] identifier[innerCountAvg] operator[=] Other[0] operator[SEP] Keyword[long] identifier[innerStartTime] operator[=] identifier[Long] operator[SEP] identifier[MAX_VALUE] operator[SEP] Keyword[long] identifier[innerEndTime] operator[=] Other[0] operator[SEP] identifier[String] identifier[innerValue] operator[=] Other[null] operator[SEP] Keyword[double] identifier[innerResult] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[MetricDatapoint] identifier[datapoint] operator[:] identifier[bucket] operator[SEP] {
Keyword[if] operator[SEP] identifier[datapoint] operator[SEP] identifier[inRange] operator[SEP] identifier[startTime] , identifier[endTime] operator[SEP] operator[SEP] {
Keyword[switch] operator[SEP] identifier[type] operator[SEP] {
Keyword[case] identifier[AVG] operator[:] identifier[outterCountAvg] operator[++] operator[SEP] identifier[innerCountAvg] operator[++] operator[SEP] Keyword[case] identifier[SUM] operator[:] identifier[outterResult] operator[+=] identifier[Double] operator[SEP] identifier[parseDouble] operator[SEP] identifier[datapoint] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[innerResult] operator[+=] identifier[Double] operator[SEP] identifier[parseDouble] operator[SEP] identifier[datapoint] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[LAST] operator[:] Keyword[if] operator[SEP] identifier[outterEndTime] operator[<] identifier[datapoint] operator[SEP] identifier[getTimestamp] operator[SEP] operator[SEP] operator[SEP] {
identifier[outterValue] operator[=] identifier[datapoint] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[innerEndTime] operator[<] identifier[datapoint] operator[SEP] identifier[getTimestamp] operator[SEP] operator[SEP] operator[SEP] {
identifier[innerValue] operator[=] identifier[datapoint] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[UNKNOWN] operator[:] Keyword[default] operator[:] identifier[LOG] operator[SEP] identifier[warning] operator[SEP] literal[String] operator[+] identifier[type] operator[SEP] operator[SEP] Keyword[return] operator[SEP]
}
identifier[outterStartTime] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[outterStartTime] , identifier[datapoint] operator[SEP] identifier[getTimestamp] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[outterEndTime] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[outterEndTime] , identifier[datapoint] operator[SEP] identifier[getTimestamp] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[innerStartTime] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[innerStartTime] , identifier[datapoint] operator[SEP] identifier[getTimestamp] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[innerEndTime] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[innerEndTime] , identifier[datapoint] operator[SEP] identifier[getTimestamp] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[MetricsFilter] operator[SEP] identifier[MetricAggregationType] operator[SEP] identifier[AVG] operator[SEP] operator[&&] identifier[innerCountAvg] operator[>] Other[0] operator[SEP] {
identifier[innerValue] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[innerResult] operator[/] identifier[innerCountAvg] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[MetricsFilter] operator[SEP] identifier[MetricAggregationType] operator[SEP] identifier[SUM] operator[SEP] operator[SEP] {
identifier[innerValue] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[innerResult] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[innerValue] operator[!=] Other[null] operator[&&] identifier[granularity] operator[SEP] identifier[equals] operator[SEP] identifier[MetricGranularity] operator[SEP] identifier[AGGREGATE_BY_BUCKET] operator[SEP] operator[SEP] {
identifier[metricValue] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[MetricTimeRangeValue] operator[SEP] identifier[innerStartTime] , identifier[innerEndTime] , identifier[innerValue] operator[SEP] operator[SEP] operator[SEP]
}
}
}
Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[MetricsFilter] operator[SEP] identifier[MetricAggregationType] operator[SEP] identifier[AVG] operator[SEP] operator[&&] identifier[outterCountAvg] operator[>] Other[0] operator[SEP] {
identifier[outterValue] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[outterResult] operator[/] identifier[outterCountAvg] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] identifier[MetricsFilter] operator[SEP] identifier[MetricAggregationType] operator[SEP] identifier[SUM] operator[SEP] operator[SEP] {
identifier[outterValue] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[outterResult] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[outterValue] operator[!=] Other[null] operator[&&] identifier[granularity] operator[SEP] identifier[equals] operator[SEP] identifier[MetricGranularity] operator[SEP] identifier[AGGREGATE_ALL_METRICS] operator[SEP] operator[SEP] {
identifier[metricValue] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[MetricTimeRangeValue] operator[SEP] identifier[outterStartTime] , identifier[outterEndTime] , identifier[outterValue] operator[SEP] operator[SEP] operator[SEP]
}
}
|
@Override
public CommandGroup createCommandGroup(String groupId, List<? extends AbstractCommand> members) {
return createCommandGroup(groupId, members.toArray(), false, null);
} | class class_name[name] begin[{]
method[createCommandGroup, return_type[type[CommandGroup]], modifier[public], parameter[groupId, members]] begin[{]
return[call[.createCommandGroup, parameter[member[.groupId], call[members.toArray, parameter[]], literal[false], literal[null]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[CommandGroup] identifier[createCommandGroup] operator[SEP] identifier[String] identifier[groupId] , identifier[List] operator[<] operator[?] Keyword[extends] identifier[AbstractCommand] operator[>] identifier[members] operator[SEP] {
Keyword[return] identifier[createCommandGroup] operator[SEP] identifier[groupId] , identifier[members] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] , literal[boolean] , Other[null] operator[SEP] operator[SEP]
}
|
private void dropTemporaryQueues()
{
synchronized (temporaryQueues)
{
Iterator<String> remainingQueues = temporaryQueues.iterator();
while (remainingQueues.hasNext())
{
String queueName = remainingQueues.next();
try
{
deleteTemporaryQueue(queueName);
}
catch (JMSException e)
{
ErrorTools.log(e, log);
}
}
}
} | class class_name[name] begin[{]
method[dropTemporaryQueues, return_type[void], modifier[private], parameter[]] begin[{]
SYNCHRONIZED[member[.temporaryQueues]] BEGIN[{]
local_variable[type[Iterator], remainingQueues]
while[call[remainingQueues.hasNext, parameter[]]] begin[{]
local_variable[type[String], queueName]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=queueName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deleteTemporaryQueue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=ErrorTools, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JMSException']))], finally_block=None, label=None, resources=None)
end[}]
END[}]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[dropTemporaryQueues] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[temporaryQueues] operator[SEP] {
identifier[Iterator] operator[<] identifier[String] operator[>] identifier[remainingQueues] operator[=] identifier[temporaryQueues] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[remainingQueues] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] {
identifier[String] identifier[queueName] operator[=] identifier[remainingQueues] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[deleteTemporaryQueue] operator[SEP] identifier[queueName] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[JMSException] identifier[e] operator[SEP] {
identifier[ErrorTools] operator[SEP] identifier[log] operator[SEP] identifier[e] , identifier[log] operator[SEP] operator[SEP]
}
}
}
}
|
public void setRepositoriesNotFound(java.util.Collection<String> repositoriesNotFound) {
if (repositoriesNotFound == null) {
this.repositoriesNotFound = null;
return;
}
this.repositoriesNotFound = new java.util.ArrayList<String>(repositoriesNotFound);
} | class class_name[name] begin[{]
method[setRepositoriesNotFound, return_type[void], modifier[public], parameter[repositoriesNotFound]] begin[{]
if[binary_operation[member[.repositoriesNotFound], ==, literal[null]]] begin[{]
assign[THIS[member[None.repositoriesNotFound]], literal[null]]
return[None]
else begin[{]
None
end[}]
assign[THIS[member[None.repositoriesNotFound]], ClassCreator(arguments=[MemberReference(member=repositoriesNotFound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setRepositoriesNotFound] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[repositoriesNotFound] operator[SEP] {
Keyword[if] operator[SEP] identifier[repositoriesNotFound] operator[==] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identifier[repositoriesNotFound] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP]
}
Keyword[this] operator[SEP] identifier[repositoriesNotFound] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[repositoriesNotFound] operator[SEP] operator[SEP]
}
|
@Override
public final <T> Comparable getComparableProperty(final PropertyKey<T> key) {
if (key != null) {
final T propertyValue = getProperty(key);
// check property converter
PropertyConverter<T, ?> converter = key.databaseConverter(securityContext, this);
if (converter != null) {
try {
return converter.convertForSorting(propertyValue);
} catch (Throwable t) {
logger.warn("Unable to convert property {} of type {}: {}", new Object[]{
key.dbName(),
getClass().getSimpleName(),
t.getMessage()
});
logger.warn("", t);
}
}
// conversion failed, may the property value itself is comparable
if (propertyValue instanceof Comparable) {
return (Comparable) propertyValue;
}
// last try: convertFromInput to String to make comparable
if (propertyValue != null) {
return propertyValue.toString();
}
}
return null;
} | class class_name[name] begin[{]
method[getComparableProperty, return_type[type[Comparable]], modifier[final public], parameter[key]] begin[{]
if[binary_operation[member[.key], !=, literal[null]]] begin[{]
local_variable[type[T], propertyValue]
local_variable[type[PropertyConverter], converter]
if[binary_operation[member[.converter], !=, literal[null]]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=propertyValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertForSorting, postfix_operators=[], prefix_operators=[], qualifier=converter, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to convert property {} of type {}: {}"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=dbName, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None)
else begin[{]
None
end[}]
if[binary_operation[member[.propertyValue], instanceof, type[Comparable]]] begin[{]
return[Cast(expression=MemberReference(member=propertyValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Comparable, sub_type=None))]
else begin[{]
None
end[}]
if[binary_operation[member[.propertyValue], !=, literal[null]]] begin[{]
return[call[propertyValue.toString, parameter[]]]
else begin[{]
None
end[}]
else begin[{]
None
end[}]
return[literal[null]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[final] operator[<] identifier[T] operator[>] identifier[Comparable] identifier[getComparableProperty] operator[SEP] Keyword[final] identifier[PropertyKey] operator[<] identifier[T] operator[>] identifier[key] operator[SEP] {
Keyword[if] operator[SEP] identifier[key] operator[!=] Other[null] operator[SEP] {
Keyword[final] identifier[T] identifier[propertyValue] operator[=] identifier[getProperty] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[PropertyConverter] operator[<] identifier[T] , operator[?] operator[>] identifier[converter] operator[=] identifier[key] operator[SEP] identifier[databaseConverter] operator[SEP] identifier[securityContext] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[converter] operator[!=] Other[null] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[converter] operator[SEP] identifier[convertForSorting] operator[SEP] identifier[propertyValue] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] {
identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] {
identifier[key] operator[SEP] identifier[dbName] operator[SEP] operator[SEP] , identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] , identifier[t] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP]
} operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[t] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[propertyValue] Keyword[instanceof] identifier[Comparable] operator[SEP] {
Keyword[return] operator[SEP] identifier[Comparable] operator[SEP] identifier[propertyValue] operator[SEP]
}
Keyword[if] operator[SEP] identifier[propertyValue] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[propertyValue] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[return] Other[null] operator[SEP]
}
|
public static IRI getDefaultProfile(final RDFSyntax syntax, final IRI identifier,
final String defaultJsonLdProfile) {
if (RDFA.equals(syntax)) {
return identifier;
} else if (defaultJsonLdProfile != null) {
return rdf.createIRI(defaultJsonLdProfile);
}
return compacted;
} | class class_name[name] begin[{]
method[getDefaultProfile, return_type[type[IRI]], modifier[public static], parameter[syntax, identifier, defaultJsonLdProfile]] begin[{]
if[call[RDFA.equals, parameter[member[.syntax]]]] begin[{]
return[member[.identifier]]
else begin[{]
if[binary_operation[member[.defaultJsonLdProfile], !=, literal[null]]] begin[{]
return[call[rdf.createIRI, parameter[member[.defaultJsonLdProfile]]]]
else begin[{]
None
end[}]
end[}]
return[member[.compacted]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[IRI] identifier[getDefaultProfile] operator[SEP] Keyword[final] identifier[RDFSyntax] identifier[syntax] , Keyword[final] identifier[IRI] identifier[identifier] , Keyword[final] identifier[String] identifier[defaultJsonLdProfile] operator[SEP] {
Keyword[if] operator[SEP] identifier[RDFA] operator[SEP] identifier[equals] operator[SEP] identifier[syntax] operator[SEP] operator[SEP] {
Keyword[return] identifier[identifier] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[defaultJsonLdProfile] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[rdf] operator[SEP] identifier[createIRI] operator[SEP] identifier[defaultJsonLdProfile] operator[SEP] operator[SEP]
}
Keyword[return] identifier[compacted] operator[SEP]
}
|
protected TagView getInputTag() {
if (isAppendMode) {
final int inputTagIndex = getChildCount() - 1;
final TagView inputTag = getTagAt(inputTagIndex);
if (inputTag != null && inputTag.mState == TagView.STATE_INPUT) {
return inputTag;
} else {
return null;
}
} else {
return null;
}
} | class class_name[name] begin[{]
method[getInputTag, return_type[type[TagView]], modifier[protected], parameter[]] begin[{]
if[member[.isAppendMode]] begin[{]
local_variable[type[int], inputTagIndex]
local_variable[type[TagView], inputTag]
if[binary_operation[binary_operation[member[.inputTag], !=, literal[null]], &&, binary_operation[member[inputTag.mState], ==, member[TagView.STATE_INPUT]]]] begin[{]
return[member[.inputTag]]
else begin[{]
return[literal[null]]
end[}]
else begin[{]
return[literal[null]]
end[}]
end[}]
END[}] | Keyword[protected] identifier[TagView] identifier[getInputTag] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[isAppendMode] operator[SEP] {
Keyword[final] Keyword[int] identifier[inputTagIndex] operator[=] identifier[getChildCount] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] Keyword[final] identifier[TagView] identifier[inputTag] operator[=] identifier[getTagAt] operator[SEP] identifier[inputTagIndex] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[inputTag] operator[!=] Other[null] operator[&&] identifier[inputTag] operator[SEP] identifier[mState] operator[==] identifier[TagView] operator[SEP] identifier[STATE_INPUT] operator[SEP] {
Keyword[return] identifier[inputTag] operator[SEP]
}
Keyword[else] {
Keyword[return] Other[null] operator[SEP]
}
}
Keyword[else] {
Keyword[return] Other[null] operator[SEP]
}
}
|
public TableRef on(StorageEvent eventType, final OnItemSnapshot onItemSnapshot) {
return on(eventType, onItemSnapshot, null);
} | class class_name[name] begin[{]
method[on, return_type[type[TableRef]], modifier[public], parameter[eventType, onItemSnapshot]] begin[{]
return[call[.on, parameter[member[.eventType], member[.onItemSnapshot], literal[null]]]]
end[}]
END[}] | Keyword[public] identifier[TableRef] identifier[on] operator[SEP] identifier[StorageEvent] identifier[eventType] , Keyword[final] identifier[OnItemSnapshot] identifier[onItemSnapshot] operator[SEP] {
Keyword[return] identifier[on] operator[SEP] identifier[eventType] , identifier[onItemSnapshot] , Other[null] operator[SEP] operator[SEP]
}
|
@Override
public DeleteEntityRecognizerResult deleteEntityRecognizer(DeleteEntityRecognizerRequest request) {
request = beforeClientExecution(request);
return executeDeleteEntityRecognizer(request);
} | class class_name[name] begin[{]
method[deleteEntityRecognizer, return_type[type[DeleteEntityRecognizerResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeDeleteEntityRecognizer, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[DeleteEntityRecognizerResult] identifier[deleteEntityRecognizer] operator[SEP] identifier[DeleteEntityRecognizerRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDeleteEntityRecognizer] operator[SEP] identifier[request] operator[SEP] operator[SEP]
}
|
public void marshall(RateBasedRule rateBasedRule, ProtocolMarshaller protocolMarshaller) {
if (rateBasedRule == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(rateBasedRule.getRuleId(), RULEID_BINDING);
protocolMarshaller.marshall(rateBasedRule.getName(), NAME_BINDING);
protocolMarshaller.marshall(rateBasedRule.getMetricName(), METRICNAME_BINDING);
protocolMarshaller.marshall(rateBasedRule.getMatchPredicates(), MATCHPREDICATES_BINDING);
protocolMarshaller.marshall(rateBasedRule.getRateKey(), RATEKEY_BINDING);
protocolMarshaller.marshall(rateBasedRule.getRateLimit(), RATELIMIT_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[rateBasedRule, protocolMarshaller]] begin[{]
if[binary_operation[member[.rateBasedRule], ==, 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=getRuleId, postfix_operators=[], prefix_operators=[], qualifier=rateBasedRule, selectors=[], type_arguments=None), MemberReference(member=RULEID_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=getName, postfix_operators=[], prefix_operators=[], qualifier=rateBasedRule, selectors=[], type_arguments=None), MemberReference(member=NAME_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=getMetricName, postfix_operators=[], prefix_operators=[], qualifier=rateBasedRule, selectors=[], type_arguments=None), MemberReference(member=METRICNAME_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=getMatchPredicates, postfix_operators=[], prefix_operators=[], qualifier=rateBasedRule, selectors=[], type_arguments=None), MemberReference(member=MATCHPREDICATES_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=getRateKey, postfix_operators=[], prefix_operators=[], qualifier=rateBasedRule, selectors=[], type_arguments=None), MemberReference(member=RATEKEY_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=getRateLimit, postfix_operators=[], prefix_operators=[], qualifier=rateBasedRule, selectors=[], type_arguments=None), MemberReference(member=RATELIMIT_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[RateBasedRule] identifier[rateBasedRule] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[rateBasedRule] 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[rateBasedRule] operator[SEP] identifier[getRuleId] operator[SEP] operator[SEP] , identifier[RULEID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[rateBasedRule] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[NAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[rateBasedRule] operator[SEP] identifier[getMetricName] operator[SEP] operator[SEP] , identifier[METRICNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[rateBasedRule] operator[SEP] identifier[getMatchPredicates] operator[SEP] operator[SEP] , identifier[MATCHPREDICATES_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[rateBasedRule] operator[SEP] identifier[getRateKey] operator[SEP] operator[SEP] , identifier[RATEKEY_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[rateBasedRule] operator[SEP] identifier[getRateLimit] operator[SEP] operator[SEP] , identifier[RATELIMIT_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 setPosOnBand(PosOnBand value) {
if (value == null) {
getElement().removeClassName(STYLE_UI_BTN_RIGHT);
getElement().removeClassName(STYLE_UI_BTN_LEFT);
} else {
switch (value) {
case LEFT:
getElement().addClassName(STYLE_UI_BTN_LEFT);
break;
case RIGHT:
getElement().addClassName(STYLE_UI_BTN_RIGHT);
break;
}
}
} | class class_name[name] begin[{]
method[setPosOnBand, return_type[void], modifier[public], parameter[value]] begin[{]
if[binary_operation[member[.value], ==, literal[null]]] begin[{]
call[.getElement, parameter[]]
call[.getElement, parameter[]]
else begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=['LEFT'], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=STYLE_UI_BTN_LEFT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addClassName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RIGHT'], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=STYLE_UI_BTN_RIGHT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addClassName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)
end[}]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setPosOnBand] operator[SEP] identifier[PosOnBand] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] {
identifier[getElement] operator[SEP] operator[SEP] operator[SEP] identifier[removeClassName] operator[SEP] identifier[STYLE_UI_BTN_RIGHT] operator[SEP] operator[SEP] identifier[getElement] operator[SEP] operator[SEP] operator[SEP] identifier[removeClassName] operator[SEP] identifier[STYLE_UI_BTN_LEFT] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[switch] operator[SEP] identifier[value] operator[SEP] {
Keyword[case] identifier[LEFT] operator[:] identifier[getElement] operator[SEP] operator[SEP] operator[SEP] identifier[addClassName] operator[SEP] identifier[STYLE_UI_BTN_LEFT] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RIGHT] operator[:] identifier[getElement] operator[SEP] operator[SEP] operator[SEP] identifier[addClassName] operator[SEP] identifier[STYLE_UI_BTN_RIGHT] operator[SEP] operator[SEP] Keyword[break] operator[SEP]
}
}
}
|
public static Optional<OffsetRange<CharOffset>> charOffsetsOfWholeString(String s) {
if (s.isEmpty()) {
return Optional.absent();
}
return Optional.of(charOffsetRange(0, s.length() - 1));
} | class class_name[name] begin[{]
method[charOffsetsOfWholeString, return_type[type[Optional]], modifier[public static], parameter[s]] begin[{]
if[call[s.isEmpty, parameter[]]] begin[{]
return[call[Optional.absent, parameter[]]]
else begin[{]
None
end[}]
return[call[Optional.of, parameter[call[.charOffsetRange, parameter[literal[0], binary_operation[call[s.length, parameter[]], -, literal[1]]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Optional] operator[<] identifier[OffsetRange] operator[<] identifier[CharOffset] operator[>] operator[>] identifier[charOffsetsOfWholeString] operator[SEP] identifier[String] identifier[s] operator[SEP] {
Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[Optional] operator[SEP] identifier[absent] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[charOffsetRange] operator[SEP] Other[0] , identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP]
}
|
private synchronized void cleanupThread ( long timeout ) throws TransportException {
Thread t = this.thread;
if ( t != null && Thread.currentThread() != t ) {
this.thread = null;
try {
log.debug("Interrupting transport thread");
t.interrupt();
log.debug("Joining transport thread");
t.join(timeout);
log.debug("Joined transport thread");
}
catch ( InterruptedException e ) {
throw new TransportException("Failed to join transport thread", e);
}
}
else if ( t != null ) {
this.thread = null;
}
} | class class_name[name] begin[{]
method[cleanupThread, return_type[void], modifier[synchronized private], parameter[timeout]] begin[{]
local_variable[type[Thread], t]
if[binary_operation[binary_operation[member[.t], !=, literal[null]], &&, binary_operation[call[Thread.currentThread, parameter[]], !=, member[.t]]]] begin[{]
assign[THIS[member[None.thread]], literal[null]]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Interrupting transport thread")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=interrupt, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Joining transport thread")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=timeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=join, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Joined transport thread")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to join transport thread"), 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=TransportException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException']))], finally_block=None, label=None, resources=None)
else begin[{]
if[binary_operation[member[.t], !=, literal[null]]] begin[{]
assign[THIS[member[None.thread]], literal[null]]
else begin[{]
None
end[}]
end[}]
end[}]
END[}] | Keyword[private] Keyword[synchronized] Keyword[void] identifier[cleanupThread] operator[SEP] Keyword[long] identifier[timeout] operator[SEP] Keyword[throws] identifier[TransportException] {
identifier[Thread] identifier[t] operator[=] Keyword[this] operator[SEP] identifier[thread] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[!=] Other[null] operator[&&] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[!=] identifier[t] operator[SEP] {
Keyword[this] operator[SEP] identifier[thread] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[t] operator[SEP] identifier[interrupt] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[t] operator[SEP] identifier[join] operator[SEP] identifier[timeout] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] {
Keyword[throw] Keyword[new] identifier[TransportException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP]
}
}
Keyword[else] Keyword[if] operator[SEP] identifier[t] operator[!=] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identifier[thread] operator[=] Other[null] operator[SEP]
}
}
|
public void removeProp(String key) {
this.specProperties.remove(key);
if (this.commonProperties.containsKey(key)) {
// This case should not happen.
Properties commonPropsCopy = new Properties();
commonPropsCopy.putAll(this.commonProperties);
commonPropsCopy.remove(key);
this.commonProperties = commonPropsCopy;
}
} | class class_name[name] begin[{]
method[removeProp, return_type[void], modifier[public], parameter[key]] begin[{]
THIS[member[None.specProperties]call[None.remove, parameter[member[.key]]]]
if[THIS[member[None.commonProperties]call[None.containsKey, parameter[member[.key]]]]] begin[{]
local_variable[type[Properties], commonPropsCopy]
call[commonPropsCopy.putAll, parameter[THIS[member[None.commonProperties]]]]
call[commonPropsCopy.remove, parameter[member[.key]]]
assign[THIS[member[None.commonProperties]], member[.commonPropsCopy]]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[removeProp] operator[SEP] identifier[String] identifier[key] operator[SEP] {
Keyword[this] operator[SEP] identifier[specProperties] operator[SEP] identifier[remove] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[commonProperties] operator[SEP] identifier[containsKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] {
identifier[Properties] identifier[commonPropsCopy] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] identifier[commonPropsCopy] operator[SEP] identifier[putAll] operator[SEP] Keyword[this] operator[SEP] identifier[commonProperties] operator[SEP] operator[SEP] identifier[commonPropsCopy] operator[SEP] identifier[remove] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[commonProperties] operator[=] identifier[commonPropsCopy] operator[SEP]
}
}
|
public void marshall(ListTagsRequest listTagsRequest, ProtocolMarshaller protocolMarshaller) {
if (listTagsRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(listTagsRequest.getResourceIdList(), RESOURCEIDLIST_BINDING);
protocolMarshaller.marshall(listTagsRequest.getNextToken(), NEXTTOKEN_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
} | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[listTagsRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.listTagsRequest], ==, 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=getResourceIdList, postfix_operators=[], prefix_operators=[], qualifier=listTagsRequest, selectors=[], type_arguments=None), MemberReference(member=RESOURCEIDLIST_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNextToken, postfix_operators=[], prefix_operators=[], qualifier=listTagsRequest, selectors=[], type_arguments=None), MemberReference(member=NEXTTOKEN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)
end[}]
END[}] | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ListTagsRequest] identifier[listTagsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[listTagsRequest] 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[listTagsRequest] operator[SEP] identifier[getResourceIdList] operator[SEP] operator[SEP] , identifier[RESOURCEIDLIST_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listTagsRequest] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] {
Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP]
}
}
|
private static Boolean stringToBoolean(String value) {
final String s = blankToNull(value);
return s == null ? null : Boolean.valueOf(s);
} | class class_name[name] begin[{]
method[stringToBoolean, return_type[type[Boolean]], modifier[private static], parameter[value]] begin[{]
local_variable[type[String], s]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))]
end[}]
END[}] | Keyword[private] Keyword[static] identifier[Boolean] identifier[stringToBoolean] operator[SEP] identifier[String] identifier[value] operator[SEP] {
Keyword[final] identifier[String] identifier[s] operator[=] identifier[blankToNull] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[return] identifier[s] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[s] operator[SEP] operator[SEP]
}
|
@BetaApi
public final void deleteZoneOperation(ProjectZoneOperationName operation) {
DeleteZoneOperationHttpRequest request =
DeleteZoneOperationHttpRequest.newBuilder()
.setOperation(operation == null ? null : operation.toString())
.build();
deleteZoneOperation(request);
} | class class_name[name] begin[{]
method[deleteZoneOperation, return_type[void], modifier[final public], parameter[operation]] begin[{]
local_variable[type[DeleteZoneOperationHttpRequest], request]
call[.deleteZoneOperation, parameter[member[.request]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] Keyword[void] identifier[deleteZoneOperation] operator[SEP] identifier[ProjectZoneOperationName] identifier[operation] operator[SEP] {
identifier[DeleteZoneOperationHttpRequest] identifier[request] operator[=] identifier[DeleteZoneOperationHttpRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setOperation] operator[SEP] identifier[operation] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[operation] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[deleteZoneOperation] operator[SEP] identifier[request] operator[SEP] operator[SEP]
}
|
void merge(DefaultWorkspaceFilter workspaceFilter) {
for (Filter item : filters) {
PathFilterSet filterSet = toFilterSet(item);
boolean exists = false;
for (PathFilterSet existingFilterSet : workspaceFilter.getFilterSets()) {
if (filterSet.equals(existingFilterSet)) {
exists = true;
}
}
if (!exists) {
workspaceFilter.add(filterSet);
}
}
} | class class_name[name] begin[{]
method[merge, return_type[void], modifier[default], parameter[workspaceFilter]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toFilterSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=filterSet)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PathFilterSet, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=exists)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=existingFilterSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=filterSet, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=exists, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getFilterSets, postfix_operators=[], prefix_operators=[], qualifier=workspaceFilter, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=existingFilterSet)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PathFilterSet, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=exists, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=filterSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=workspaceFilter, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=filters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=item)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Filter, sub_type=None))), label=None)
end[}]
END[}] | Keyword[void] identifier[merge] operator[SEP] identifier[DefaultWorkspaceFilter] identifier[workspaceFilter] operator[SEP] {
Keyword[for] operator[SEP] identifier[Filter] identifier[item] operator[:] identifier[filters] operator[SEP] {
identifier[PathFilterSet] identifier[filterSet] operator[=] identifier[toFilterSet] operator[SEP] identifier[item] operator[SEP] operator[SEP] Keyword[boolean] identifier[exists] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[PathFilterSet] identifier[existingFilterSet] operator[:] identifier[workspaceFilter] operator[SEP] identifier[getFilterSets] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[filterSet] operator[SEP] identifier[equals] operator[SEP] identifier[existingFilterSet] operator[SEP] operator[SEP] {
identifier[exists] operator[=] literal[boolean] operator[SEP]
}
}
Keyword[if] operator[SEP] operator[!] identifier[exists] operator[SEP] {
identifier[workspaceFilter] operator[SEP] identifier[add] operator[SEP] identifier[filterSet] operator[SEP] operator[SEP]
}
}
}
|
protected static final int floatToS390IntBits(float ieeeFloat) throws IOException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "floatToS390IntBits", ieeeFloat);
// Get the bit pattern
int ieeeIntBits = Float.floatToIntBits(ieeeFloat);
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "IEEE bit pattern = " + Integer.toString(ieeeIntBits, 16));
// Test the sign bit (0 = positive, 1 = negative)
boolean positive = ((ieeeIntBits & FLOAT_SIGN_MASK) == 0);
// Deal with zero straight away...
if ((ieeeIntBits & 0x7fffffff) == 0) {
// + or - 0.0
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "zero");
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "floatToS390IntBits", ieeeIntBits);
return ieeeIntBits;
}
// Extract the exponent
int exponent = ieeeIntBits & FLOAT_EXPONENT_MASK;
// shift right 23 bits to get exponent in least significant byte
exponent = exponent >>> 23;
// subtract the bias to get the true value
exponent = exponent - FLOAT_BIAS;
// Extract the mantissa
int mantissa = ieeeIntBits & FLOAT_MANTISSA_MASK;
// for an exponent greater than -FLOAT_BIAS, add in the implicit bit
if (exponent > (-FLOAT_BIAS)) {
mantissa = mantissa | FLOAT_MANTISSA_MSB_MASK;
}
// Now begin the conversion to S390
int remainder = Math.abs(exponent) % 4;
int quotient = Math.abs(exponent) / 4;
int s390Exponent = quotient;
if ((exponent > 0) && (remainder != 0)) {
s390Exponent = s390Exponent + 1;
}
// put the sign back in
if (exponent < 0) {
s390Exponent = -s390Exponent;
}
// Add the bias
s390Exponent += S390_FLOAT_BIAS;
// Now adjust the mantissa part
int s390Mantissa = mantissa;
if (remainder > 0) {
if (exponent > 0) {
// the next two lines perform the (m.2^(r-4)) part of the conversion
int shift_places = 4 - remainder;
s390Mantissa = s390Mantissa >>> shift_places;
}
else {
// to avoid loss of precision when the exponent is at a minimum,
// we may need to shift the mantissa four places left, and decrease the
// s390Exponent by one before shifting right
if ((exponent == - (FLOAT_BIAS)) && ((s390Mantissa & 0x00f00000) == 0)) {
s390Mantissa = s390Mantissa << 4;
s390Exponent = s390Exponent - 1;
}
// the next two line perform the (m.2^-r) part of the conversion
int shift_places = remainder;
s390Mantissa = s390Mantissa >>> shift_places;
}
}
// An exponent of -FLOAT_BIAS is the smallest that IEEE can do. S390 has
// a wider range, and hence may be able to normalise the mantissa more than
// is possible for IEEE
// Also, since an exponent of -FLOAT_BIAS has no implicit bit set, the mantissa
// starts with a value of 2^-1 at the second bit of the second byte. We thus need
// to shift one place left to move the mantissa to the S390 position
// Follwoing that, we notmalise as follows:
// Each shift left of four bits is equivalent to multiplying by 16,
// so the exponent must be reduced by 1
if (exponent == - (FLOAT_BIAS)) {
s390Mantissa = s390Mantissa << 1;
while ((s390Mantissa != 0) && ((s390Mantissa & 0x00f00000) == 0)) {
s390Mantissa = s390Mantissa << 4;
s390Exponent = s390Exponent - 1;
}
}
// Assemble the s390BitPattern
int s390Float = 0;
int s390ExponentBits = s390Exponent & 0x0000007F; // make sure we only deal with 7 bits
// add the exponent
s390Float = s390ExponentBits << 24; // shift to MSB
// add the sign
if (!positive) {
s390Float = s390Float | FLOAT_SIGN_MASK;
}
// add the mantissa
s390Float = s390Float | s390Mantissa;
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "S390 Bit pattern = " + Integer.toString(s390Float, 16));
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "floatToS390IntBits", s390Float);
return s390Float;
} | class class_name[name] begin[{]
method[floatToS390IntBits, return_type[type[int]], modifier[final static protected], parameter[ieeeFloat]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member[.tc], literal["floatToS390IntBits"], member[.ieeeFloat]]]
else begin[{]
None
end[}]
local_variable[type[int], ieeeIntBits]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{]
call[SibTr.debug, parameter[member[.tc], binary_operation[literal["IEEE bit pattern = "], +, call[Integer.toString, parameter[member[.ieeeIntBits], literal[16]]]]]]
else begin[{]
None
end[}]
local_variable[type[boolean], positive]
if[binary_operation[binary_operation[member[.ieeeIntBits], &, literal[0x7fffffff]], ==, literal[0]]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{]
call[SibTr.debug, parameter[member[.tc], literal["zero"]]]
else begin[{]
None
end[}]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.exit, parameter[member[.tc], literal["floatToS390IntBits"], member[.ieeeIntBits]]]
else begin[{]
None
end[}]
return[member[.ieeeIntBits]]
else begin[{]
None
end[}]
local_variable[type[int], exponent]
assign[member[.exponent], binary_operation[member[.exponent], >>>, literal[23]]]
assign[member[.exponent], binary_operation[member[.exponent], -, member[.FLOAT_BIAS]]]
local_variable[type[int], mantissa]
if[binary_operation[member[.exponent], >, member[.FLOAT_BIAS]]] begin[{]
assign[member[.mantissa], binary_operation[member[.mantissa], |, member[.FLOAT_MANTISSA_MSB_MASK]]]
else begin[{]
None
end[}]
local_variable[type[int], remainder]
local_variable[type[int], quotient]
local_variable[type[int], s390Exponent]
if[binary_operation[binary_operation[member[.exponent], >, literal[0]], &&, binary_operation[member[.remainder], !=, literal[0]]]] begin[{]
assign[member[.s390Exponent], binary_operation[member[.s390Exponent], +, literal[1]]]
else begin[{]
None
end[}]
if[binary_operation[member[.exponent], <, literal[0]]] begin[{]
assign[member[.s390Exponent], member[.s390Exponent]]
else begin[{]
None
end[}]
assign[member[.s390Exponent], member[.S390_FLOAT_BIAS]]
local_variable[type[int], s390Mantissa]
if[binary_operation[member[.remainder], >, literal[0]]] begin[{]
if[binary_operation[member[.exponent], >, literal[0]]] begin[{]
local_variable[type[int], shift_places]
assign[member[.s390Mantissa], binary_operation[member[.s390Mantissa], >>>, member[.shift_places]]]
else begin[{]
if[binary_operation[binary_operation[member[.exponent], ==, member[.FLOAT_BIAS]], &&, binary_operation[binary_operation[member[.s390Mantissa], &, literal[0x00f00000]], ==, literal[0]]]] begin[{]
assign[member[.s390Mantissa], binary_operation[member[.s390Mantissa], <<, literal[4]]]
assign[member[.s390Exponent], binary_operation[member[.s390Exponent], -, literal[1]]]
else begin[{]
None
end[}]
local_variable[type[int], shift_places]
assign[member[.s390Mantissa], binary_operation[member[.s390Mantissa], >>>, member[.shift_places]]]
end[}]
else begin[{]
None
end[}]
if[binary_operation[member[.exponent], ==, member[.FLOAT_BIAS]]] begin[{]
assign[member[.s390Mantissa], binary_operation[member[.s390Mantissa], <<, literal[1]]]
while[binary_operation[binary_operation[member[.s390Mantissa], !=, literal[0]], &&, binary_operation[binary_operation[member[.s390Mantissa], &, literal[0x00f00000]], ==, literal[0]]]] begin[{]
assign[member[.s390Mantissa], binary_operation[member[.s390Mantissa], <<, literal[4]]]
assign[member[.s390Exponent], binary_operation[member[.s390Exponent], -, literal[1]]]
end[}]
else begin[{]
None
end[}]
local_variable[type[int], s390Float]
local_variable[type[int], s390ExponentBits]
assign[member[.s390Float], binary_operation[member[.s390ExponentBits], <<, literal[24]]]
if[member[.positive]] begin[{]
assign[member[.s390Float], binary_operation[member[.s390Float], |, member[.FLOAT_SIGN_MASK]]]
else begin[{]
None
end[}]
assign[member[.s390Float], binary_operation[member[.s390Float], |, member[.s390Mantissa]]]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{]
call[SibTr.debug, parameter[member[.tc], binary_operation[literal["S390 Bit pattern = "], +, call[Integer.toString, parameter[member[.s390Float], literal[16]]]]]]
else begin[{]
None
end[}]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.exit, parameter[member[.tc], literal["floatToS390IntBits"], member[.s390Float]]]
else begin[{]
None
end[}]
return[member[.s390Float]]
end[}]
END[}] | Keyword[protected] Keyword[static] Keyword[final] Keyword[int] identifier[floatToS390IntBits] operator[SEP] Keyword[float] identifier[ieeeFloat] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , identifier[ieeeFloat] operator[SEP] operator[SEP] Keyword[int] identifier[ieeeIntBits] operator[=] identifier[Float] operator[SEP] identifier[floatToIntBits] operator[SEP] identifier[ieeeFloat] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[Integer] operator[SEP] identifier[toString] operator[SEP] identifier[ieeeIntBits] , Other[16] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[positive] operator[=] operator[SEP] operator[SEP] identifier[ieeeIntBits] operator[&] identifier[FLOAT_SIGN_MASK] operator[SEP] operator[==] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[ieeeIntBits] operator[&] literal[Integer] operator[SEP] operator[==] Other[0] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[ieeeIntBits] operator[SEP] operator[SEP] Keyword[return] identifier[ieeeIntBits] operator[SEP]
}
Keyword[int] identifier[exponent] operator[=] identifier[ieeeIntBits] operator[&] identifier[FLOAT_EXPONENT_MASK] operator[SEP] identifier[exponent] operator[=] identifier[exponent] operator[>] operator[>] operator[>] Other[23] operator[SEP] identifier[exponent] operator[=] identifier[exponent] operator[-] identifier[FLOAT_BIAS] operator[SEP] Keyword[int] identifier[mantissa] operator[=] identifier[ieeeIntBits] operator[&] identifier[FLOAT_MANTISSA_MASK] operator[SEP] Keyword[if] operator[SEP] identifier[exponent] operator[>] operator[SEP] operator[-] identifier[FLOAT_BIAS] operator[SEP] operator[SEP] {
identifier[mantissa] operator[=] identifier[mantissa] operator[|] identifier[FLOAT_MANTISSA_MSB_MASK] operator[SEP]
}
Keyword[int] identifier[remainder] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[exponent] operator[SEP] operator[%] Other[4] operator[SEP] Keyword[int] identifier[quotient] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[exponent] operator[SEP] operator[/] Other[4] operator[SEP] Keyword[int] identifier[s390Exponent] operator[=] identifier[quotient] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[exponent] operator[>] Other[0] operator[SEP] operator[&&] operator[SEP] identifier[remainder] operator[!=] Other[0] operator[SEP] operator[SEP] {
identifier[s390Exponent] operator[=] identifier[s390Exponent] operator[+] Other[1] operator[SEP]
}
Keyword[if] operator[SEP] identifier[exponent] operator[<] Other[0] operator[SEP] {
identifier[s390Exponent] operator[=] operator[-] identifier[s390Exponent] operator[SEP]
}
identifier[s390Exponent] operator[+=] identifier[S390_FLOAT_BIAS] operator[SEP] Keyword[int] identifier[s390Mantissa] operator[=] identifier[mantissa] operator[SEP] Keyword[if] operator[SEP] identifier[remainder] operator[>] Other[0] operator[SEP] {
Keyword[if] operator[SEP] identifier[exponent] operator[>] Other[0] operator[SEP] {
Keyword[int] identifier[shift_places] operator[=] Other[4] operator[-] identifier[remainder] operator[SEP] identifier[s390Mantissa] operator[=] identifier[s390Mantissa] operator[>] operator[>] operator[>] identifier[shift_places] operator[SEP]
}
Keyword[else] {
Keyword[if] operator[SEP] operator[SEP] identifier[exponent] operator[==] operator[-] operator[SEP] identifier[FLOAT_BIAS] operator[SEP] operator[SEP] operator[&&] operator[SEP] operator[SEP] identifier[s390Mantissa] operator[&] literal[Integer] operator[SEP] operator[==] Other[0] operator[SEP] operator[SEP] {
identifier[s390Mantissa] operator[=] identifier[s390Mantissa] operator[<<] Other[4] operator[SEP] identifier[s390Exponent] operator[=] identifier[s390Exponent] operator[-] Other[1] operator[SEP]
}
Keyword[int] identifier[shift_places] operator[=] identifier[remainder] operator[SEP] identifier[s390Mantissa] operator[=] identifier[s390Mantissa] operator[>] operator[>] operator[>] identifier[shift_places] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[exponent] operator[==] operator[-] operator[SEP] identifier[FLOAT_BIAS] operator[SEP] operator[SEP] {
identifier[s390Mantissa] operator[=] identifier[s390Mantissa] operator[<<] Other[1] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[s390Mantissa] operator[!=] Other[0] operator[SEP] operator[&&] operator[SEP] operator[SEP] identifier[s390Mantissa] operator[&] literal[Integer] operator[SEP] operator[==] Other[0] operator[SEP] operator[SEP] {
identifier[s390Mantissa] operator[=] identifier[s390Mantissa] operator[<<] Other[4] operator[SEP] identifier[s390Exponent] operator[=] identifier[s390Exponent] operator[-] Other[1] operator[SEP]
}
}
Keyword[int] identifier[s390Float] operator[=] Other[0] operator[SEP] Keyword[int] identifier[s390ExponentBits] operator[=] identifier[s390Exponent] operator[&] literal[Integer] operator[SEP] identifier[s390Float] operator[=] identifier[s390ExponentBits] operator[<<] Other[24] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[positive] operator[SEP] {
identifier[s390Float] operator[=] identifier[s390Float] operator[|] identifier[FLOAT_SIGN_MASK] operator[SEP]
}
identifier[s390Float] operator[=] identifier[s390Float] operator[|] identifier[s390Mantissa] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[Integer] operator[SEP] identifier[toString] operator[SEP] identifier[s390Float] , Other[16] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[s390Float] operator[SEP] operator[SEP] Keyword[return] identifier[s390Float] operator[SEP]
}
|
private void selectImage() {
// Start picker activity
// For simplicity we're loading credentials from a string res, don't do this in production
String apiKey = getString(R.string.filestack_api_key);
if (apiKey.equals("")) {
throw new RuntimeException("Create a string res value for \"filestack_api_key\"");
}
Config config = new Config(apiKey, "https://form.samples.android.filestack.com");
Context context = getContext();
Intent pickerIntent = new Intent(context, FsActivity.class);
pickerIntent.putExtra(FsConstants.EXTRA_CONFIG, config);
// Restrict file selections to just images
String[] mimeTypes = {"image/*"};
pickerIntent.putExtra(FsConstants.EXTRA_MIME_TYPES, mimeTypes);
context.startActivity(pickerIntent);
// Show loading progress spinner
((MainActivity) getActivity()).setLoading(true);
} | class class_name[name] begin[{]
method[selectImage, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[String], apiKey]
if[call[apiKey.equals, parameter[literal[""]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Create a string res value for \"filestack_api_key\"")], 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[Config], config]
local_variable[type[Context], context]
local_variable[type[Intent], pickerIntent]
call[pickerIntent.putExtra, parameter[member[FsConstants.EXTRA_CONFIG], member[.config]]]
local_variable[type[String], mimeTypes]
call[pickerIntent.putExtra, parameter[member[FsConstants.EXTRA_MIME_TYPES], member[.mimeTypes]]]
call[context.startActivity, parameter[member[.pickerIntent]]]
Cast(expression=MethodInvocation(arguments=[], member=getActivity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=MainActivity, sub_type=None))
end[}]
END[}] | Keyword[private] Keyword[void] identifier[selectImage] operator[SEP] operator[SEP] {
identifier[String] identifier[apiKey] operator[=] identifier[getString] operator[SEP] identifier[R] operator[SEP] identifier[string] operator[SEP] identifier[filestack_api_key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[apiKey] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
identifier[Config] identifier[config] operator[=] Keyword[new] identifier[Config] operator[SEP] identifier[apiKey] , literal[String] operator[SEP] operator[SEP] identifier[Context] identifier[context] operator[=] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[Intent] identifier[pickerIntent] operator[=] Keyword[new] identifier[Intent] operator[SEP] identifier[context] , identifier[FsActivity] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[pickerIntent] operator[SEP] identifier[putExtra] operator[SEP] identifier[FsConstants] operator[SEP] identifier[EXTRA_CONFIG] , identifier[config] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[mimeTypes] operator[=] {
literal[String]
} operator[SEP] identifier[pickerIntent] operator[SEP] identifier[putExtra] operator[SEP] identifier[FsConstants] operator[SEP] identifier[EXTRA_MIME_TYPES] , identifier[mimeTypes] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[startActivity] operator[SEP] identifier[pickerIntent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[MainActivity] operator[SEP] identifier[getActivity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setLoading] operator[SEP] literal[boolean] operator[SEP] operator[SEP]
}
|
@Override
public String escapeObjectName(String objectName, Class<? extends DatabaseObject> objectType) {
if ((quotingStrategy == ObjectQuotingStrategy.LEGACY) && hasMixedCase(objectName)) {
return "\"" + objectName + "\"";
} else if (objectType != null && LiquibaseColumn.class.isAssignableFrom(objectType)) {
return (objectName != null && !objectName.isEmpty()) ? objectName.trim() : objectName;
}
return super.escapeObjectName(objectName, objectType);
} | class class_name[name] begin[{]
method[escapeObjectName, return_type[type[String]], modifier[public], parameter[objectName, objectType]] begin[{]
if[binary_operation[binary_operation[member[.quotingStrategy], ==, member[ObjectQuotingStrategy.LEGACY]], &&, call[.hasMixedCase, parameter[member[.objectName]]]]] begin[{]
return[binary_operation[binary_operation[literal["\""], +, member[.objectName]], +, literal["\""]]]
else begin[{]
if[binary_operation[binary_operation[member[.objectType], !=, literal[null]], &&, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=objectType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=LiquibaseColumn, sub_type=None))]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=objectName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=objectName, selectors=[], type_arguments=None), operator=&&), if_false=MemberReference(member=objectName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=objectName, selectors=[], type_arguments=None))]
else begin[{]
None
end[}]
end[}]
return[SuperMethodInvocation(arguments=[MemberReference(member=objectName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=objectType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=escapeObjectName, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[escapeObjectName] operator[SEP] identifier[String] identifier[objectName] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[DatabaseObject] operator[>] identifier[objectType] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[quotingStrategy] operator[==] identifier[ObjectQuotingStrategy] operator[SEP] identifier[LEGACY] operator[SEP] operator[&&] identifier[hasMixedCase] operator[SEP] identifier[objectName] operator[SEP] operator[SEP] {
Keyword[return] literal[String] operator[+] identifier[objectName] operator[+] literal[String] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[objectType] operator[!=] Other[null] operator[&&] identifier[LiquibaseColumn] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[objectType] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP] identifier[objectName] operator[!=] Other[null] operator[&&] operator[!] identifier[objectName] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[?] identifier[objectName] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[:] identifier[objectName] operator[SEP]
}
Keyword[return] Keyword[super] operator[SEP] identifier[escapeObjectName] operator[SEP] identifier[objectName] , identifier[objectType] operator[SEP] operator[SEP]
}
|
public final void arrayCreatorRest() throws RecognitionException {
int arrayCreatorRest_StartIndex = input.index();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 133) ) { return; }
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1260:5: ( '[' ( ']' ( '[' ']' )* arrayInitializer | expression ']' ( '[' expression ']' )* ( '[' ']' )* ) )
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1260:7: '[' ( ']' ( '[' ']' )* arrayInitializer | expression ']' ( '[' expression ']' )* ( '[' ']' )* )
{
match(input,59,FOLLOW_59_in_arrayCreatorRest6097); if (state.failed) return;
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1261:9: ( ']' ( '[' ']' )* arrayInitializer | expression ']' ( '[' expression ']' )* ( '[' ']' )* )
int alt184=2;
int LA184_0 = input.LA(1);
if ( (LA184_0==60) ) {
alt184=1;
}
else if ( ((LA184_0 >= CharacterLiteral && LA184_0 <= DecimalLiteral)||LA184_0==FloatingPointLiteral||(LA184_0 >= HexLiteral && LA184_0 <= Identifier)||(LA184_0 >= OctalLiteral && LA184_0 <= StringLiteral)||LA184_0==29||LA184_0==36||(LA184_0 >= 40 && LA184_0 <= 41)||(LA184_0 >= 44 && LA184_0 <= 45)||LA184_0==53||LA184_0==65||LA184_0==67||(LA184_0 >= 70 && LA184_0 <= 71)||LA184_0==77||(LA184_0 >= 79 && LA184_0 <= 80)||LA184_0==82||LA184_0==85||LA184_0==92||LA184_0==94||(LA184_0 >= 97 && LA184_0 <= 98)||LA184_0==105||LA184_0==108||LA184_0==111||LA184_0==115||LA184_0==118||LA184_0==126) ) {
alt184=2;
}
else {
if (state.backtracking>0) {state.failed=true; return;}
NoViableAltException nvae =
new NoViableAltException("", 184, 0, input);
throw nvae;
}
switch (alt184) {
case 1 :
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1261:13: ']' ( '[' ']' )* arrayInitializer
{
match(input,60,FOLLOW_60_in_arrayCreatorRest6111); if (state.failed) return;
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1261:17: ( '[' ']' )*
loop181:
while (true) {
int alt181=2;
int LA181_0 = input.LA(1);
if ( (LA181_0==59) ) {
alt181=1;
}
switch (alt181) {
case 1 :
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1261:18: '[' ']'
{
match(input,59,FOLLOW_59_in_arrayCreatorRest6114); if (state.failed) return;
match(input,60,FOLLOW_60_in_arrayCreatorRest6116); if (state.failed) return;
}
break;
default :
break loop181;
}
}
pushFollow(FOLLOW_arrayInitializer_in_arrayCreatorRest6120);
arrayInitializer();
state._fsp--;
if (state.failed) return;
}
break;
case 2 :
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1262:13: expression ']' ( '[' expression ']' )* ( '[' ']' )*
{
pushFollow(FOLLOW_expression_in_arrayCreatorRest6134);
expression();
state._fsp--;
if (state.failed) return;
match(input,60,FOLLOW_60_in_arrayCreatorRest6136); if (state.failed) return;
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1262:28: ( '[' expression ']' )*
loop182:
while (true) {
int alt182=2;
int LA182_0 = input.LA(1);
if ( (LA182_0==59) ) {
switch ( input.LA(2) ) {
case 40:
{
int LA182_33 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 44:
{
int LA182_34 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 41:
{
int LA182_35 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 45:
{
int LA182_36 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 126:
{
int LA182_37 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 29:
{
int LA182_38 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 36:
{
int LA182_39 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 53:
{
int LA182_40 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 111:
{
int LA182_41 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 108:
{
int LA182_42 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 80:
{
int LA182_43 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 79:
{
int LA182_44 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 70:
{
int LA182_45 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case DecimalLiteral:
case HexLiteral:
case OctalLiteral:
{
int LA182_46 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case FloatingPointLiteral:
{
int LA182_47 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case CharacterLiteral:
{
int LA182_48 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case StringLiteral:
{
int LA182_49 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 82:
case 115:
{
int LA182_50 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 98:
{
int LA182_51 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 97:
{
int LA182_52 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case Identifier:
{
int LA182_53 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 65:
case 67:
case 71:
case 77:
case 85:
case 92:
case 94:
case 105:
{
int LA182_54 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
case 118:
{
int LA182_55 = input.LA(3);
if ( (synpred286_Java()) ) {
alt182=1;
}
}
break;
}
}
switch (alt182) {
case 1 :
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1262:29: '[' expression ']'
{
match(input,59,FOLLOW_59_in_arrayCreatorRest6139); if (state.failed) return;
pushFollow(FOLLOW_expression_in_arrayCreatorRest6141);
expression();
state._fsp--;
if (state.failed) return;
match(input,60,FOLLOW_60_in_arrayCreatorRest6143); if (state.failed) return;
}
break;
default :
break loop182;
}
}
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1262:50: ( '[' ']' )*
loop183:
while (true) {
int alt183=2;
int LA183_0 = input.LA(1);
if ( (LA183_0==59) ) {
int LA183_30 = input.LA(2);
if ( (LA183_30==60) ) {
alt183=1;
}
}
switch (alt183) {
case 1 :
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1262:51: '[' ']'
{
match(input,59,FOLLOW_59_in_arrayCreatorRest6148); if (state.failed) return;
match(input,60,FOLLOW_60_in_arrayCreatorRest6150); if (state.failed) return;
}
break;
default :
break loop183;
}
}
}
break;
}
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 133, arrayCreatorRest_StartIndex); }
}
} | class class_name[name] begin[{]
method[arrayCreatorRest, return_type[void], modifier[final public], parameter[]] begin[{]
local_variable[type[int], arrayCreatorRest_StartIndex]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operandr=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=133)], member=alreadyParsedRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=None, label=None)])), BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=59), MemberReference(member=FOLLOW_59_in_arrayCreatorRest6097, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt184)], 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=LA184_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=60), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=CharacterLiteral, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DecimalLiteral, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=FloatingPointLiteral, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=HexLiteral, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=Identifier, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=OctalLiteral, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=StringLiteral, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=29), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=36), operator===), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=40), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=41), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=44), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=45), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=53), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=65), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=67), operator===), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=70), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=71), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=77), operator===), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=79), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=80), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=82), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=85), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=92), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=94), operator===), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=97), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=98), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=105), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=108), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=111), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=115), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=118), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA184_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=126), 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=""), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=184), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoViableAltException, sub_type=None)), name=nvae)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NoViableAltException, sub_type=None)), ThrowStatement(expression=MemberReference(member=nvae, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt184, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt184, 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=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=60), MemberReference(member=FOLLOW_60_in_arrayCreatorRest6111, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt181)], 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=LA181_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA181_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=59), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt181, 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=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=59), MemberReference(member=FOLLOW_59_in_arrayCreatorRest6114, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=60), MemberReference(member=FOLLOW_60_in_arrayCreatorRest6116, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=loop181, label=None)])], expression=MemberReference(member=alt181, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop181), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_arrayInitializer_in_arrayCreatorRest6120, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=arrayInitializer, 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=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_expression_in_arrayCreatorRest6134, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=expression, 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=None, label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=60), MemberReference(member=FOLLOW_60_in_arrayCreatorRest6136, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt182)], 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=LA182_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA182_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=59), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=40)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_33)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=44)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_34)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=41)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_35)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=45)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_36)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=126)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_37)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=29)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_38)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=36)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_39)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=53)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_40)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=111)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_41)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=108)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_42)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=80)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_43)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=79)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_44)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=70)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_45)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['DecimalLiteral', 'HexLiteral', 'OctalLiteral'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_46)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['FloatingPointLiteral'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_47)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['CharacterLiteral'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_48)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['StringLiteral'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_49)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=82), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=115)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_50)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=98)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_51)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=97)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_52)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Identifier'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_53)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=65), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=67), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=71), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=77), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=85), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=92), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=94), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=105)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_54)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=118)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA182_55)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred286_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)])], expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=59), MemberReference(member=FOLLOW_59_in_arrayCreatorRest6139, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_expression_in_arrayCreatorRest6141, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=expression, 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=None, label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=60), MemberReference(member=FOLLOW_60_in_arrayCreatorRest6143, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=loop182, label=None)])], expression=MemberReference(member=alt182, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop182), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt183)], 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=LA183_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA183_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=59), 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=LA183_30)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA183_30, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=60), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt183, 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=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=59), MemberReference(member=FOLLOW_59_in_arrayCreatorRest6148, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=60), MemberReference(member=FOLLOW_60_in_arrayCreatorRest6150, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=loop183, label=None)])], expression=MemberReference(member=alt183, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop183)]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt184, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reportError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), 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)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[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=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=133), MemberReference(member=arrayCreatorRest_StartIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=memoize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None)
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[void] identifier[arrayCreatorRest] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[int] identifier[arrayCreatorRest_StartIndex] operator[=] identifier[input] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[&&] identifier[alreadyParsedRule] operator[SEP] identifier[input] , Other[133] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP]
} {
identifier[match] operator[SEP] identifier[input] , Other[59] , identifier[FOLLOW_59_in_arrayCreatorRest6097] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] Keyword[int] identifier[alt184] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA184_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA184_0] operator[==] Other[60] operator[SEP] operator[SEP] {
identifier[alt184] operator[=] Other[1] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[LA184_0] operator[>=] identifier[CharacterLiteral] operator[&&] identifier[LA184_0] operator[<=] identifier[DecimalLiteral] operator[SEP] operator[||] identifier[LA184_0] operator[==] identifier[FloatingPointLiteral] operator[||] operator[SEP] identifier[LA184_0] operator[>=] identifier[HexLiteral] operator[&&] identifier[LA184_0] operator[<=] identifier[Identifier] operator[SEP] operator[||] operator[SEP] identifier[LA184_0] operator[>=] identifier[OctalLiteral] operator[&&] identifier[LA184_0] operator[<=] identifier[StringLiteral] operator[SEP] operator[||] identifier[LA184_0] operator[==] Other[29] operator[||] identifier[LA184_0] operator[==] Other[36] operator[||] operator[SEP] identifier[LA184_0] operator[>=] Other[40] operator[&&] identifier[LA184_0] operator[<=] Other[41] operator[SEP] operator[||] operator[SEP] identifier[LA184_0] operator[>=] Other[44] operator[&&] identifier[LA184_0] operator[<=] Other[45] operator[SEP] operator[||] identifier[LA184_0] operator[==] Other[53] operator[||] identifier[LA184_0] operator[==] Other[65] operator[||] identifier[LA184_0] operator[==] Other[67] operator[||] operator[SEP] identifier[LA184_0] operator[>=] Other[70] operator[&&] identifier[LA184_0] operator[<=] Other[71] operator[SEP] operator[||] identifier[LA184_0] operator[==] Other[77] operator[||] operator[SEP] identifier[LA184_0] operator[>=] Other[79] operator[&&] identifier[LA184_0] operator[<=] Other[80] operator[SEP] operator[||] identifier[LA184_0] operator[==] Other[82] operator[||] identifier[LA184_0] operator[==] Other[85] operator[||] identifier[LA184_0] operator[==] Other[92] operator[||] identifier[LA184_0] operator[==] Other[94] operator[||] operator[SEP] identifier[LA184_0] operator[>=] Other[97] operator[&&] identifier[LA184_0] operator[<=] Other[98] operator[SEP] operator[||] identifier[LA184_0] operator[==] Other[105] operator[||] identifier[LA184_0] operator[==] Other[108] operator[||] identifier[LA184_0] operator[==] Other[111] operator[||] identifier[LA184_0] operator[==] Other[115] operator[||] identifier[LA184_0] operator[==] Other[118] operator[||] identifier[LA184_0] operator[==] Other[126] operator[SEP] operator[SEP] {
identifier[alt184] operator[=] Other[2] operator[SEP]
}
Keyword[else] {
Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] {
identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] Keyword[return] operator[SEP]
}
identifier[NoViableAltException] identifier[nvae] operator[=] Keyword[new] identifier[NoViableAltException] operator[SEP] literal[String] , Other[184] , Other[0] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[nvae] operator[SEP]
}
Keyword[switch] operator[SEP] identifier[alt184] operator[SEP] {
Keyword[case] Other[1] operator[:] {
identifier[match] operator[SEP] identifier[input] , Other[60] , identifier[FOLLOW_60_in_arrayCreatorRest6111] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] identifier[loop181] operator[:] Keyword[while] operator[SEP] literal[boolean] operator[SEP] {
Keyword[int] identifier[alt181] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA181_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA181_0] operator[==] Other[59] operator[SEP] operator[SEP] {
identifier[alt181] operator[=] Other[1] operator[SEP]
}
Keyword[switch] operator[SEP] identifier[alt181] operator[SEP] {
Keyword[case] Other[1] operator[:] {
identifier[match] operator[SEP] identifier[input] , Other[59] , identifier[FOLLOW_59_in_arrayCreatorRest6114] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[60] , identifier[FOLLOW_60_in_arrayCreatorRest6116] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[loop181] operator[SEP]
}
}
identifier[pushFollow] operator[SEP] identifier[FOLLOW_arrayInitializer_in_arrayCreatorRest6120] operator[SEP] operator[SEP] identifier[arrayInitializer] 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] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] {
identifier[pushFollow] operator[SEP] identifier[FOLLOW_expression_in_arrayCreatorRest6134] operator[SEP] operator[SEP] identifier[expression] 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] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[60] , identifier[FOLLOW_60_in_arrayCreatorRest6136] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] identifier[loop182] operator[:] Keyword[while] operator[SEP] literal[boolean] operator[SEP] {
Keyword[int] identifier[alt182] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA182_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA182_0] operator[==] Other[59] operator[SEP] operator[SEP] {
Keyword[switch] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] {
Keyword[case] Other[40] operator[:] {
Keyword[int] identifier[LA182_33] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[44] operator[:] {
Keyword[int] identifier[LA182_34] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[41] operator[:] {
Keyword[int] identifier[LA182_35] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[45] operator[:] {
Keyword[int] identifier[LA182_36] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[126] operator[:] {
Keyword[int] identifier[LA182_37] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[29] operator[:] {
Keyword[int] identifier[LA182_38] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[36] operator[:] {
Keyword[int] identifier[LA182_39] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[53] operator[:] {
Keyword[int] identifier[LA182_40] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[111] operator[:] {
Keyword[int] identifier[LA182_41] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[108] operator[:] {
Keyword[int] identifier[LA182_42] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[80] operator[:] {
Keyword[int] identifier[LA182_43] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[79] operator[:] {
Keyword[int] identifier[LA182_44] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[70] operator[:] {
Keyword[int] identifier[LA182_45] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] identifier[DecimalLiteral] operator[:] Keyword[case] identifier[HexLiteral] operator[:] Keyword[case] identifier[OctalLiteral] operator[:] {
Keyword[int] identifier[LA182_46] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] identifier[FloatingPointLiteral] operator[:] {
Keyword[int] identifier[LA182_47] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] identifier[CharacterLiteral] operator[:] {
Keyword[int] identifier[LA182_48] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] identifier[StringLiteral] operator[:] {
Keyword[int] identifier[LA182_49] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[82] operator[:] Keyword[case] Other[115] operator[:] {
Keyword[int] identifier[LA182_50] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[98] operator[:] {
Keyword[int] identifier[LA182_51] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[97] operator[:] {
Keyword[int] identifier[LA182_52] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] identifier[Identifier] operator[:] {
Keyword[int] identifier[LA182_53] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[65] operator[:] Keyword[case] Other[67] operator[:] Keyword[case] Other[71] operator[:] Keyword[case] Other[77] operator[:] Keyword[case] Other[85] operator[:] Keyword[case] Other[92] operator[:] Keyword[case] Other[94] operator[:] Keyword[case] Other[105] operator[:] {
Keyword[int] identifier[LA182_54] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] Other[118] operator[:] {
Keyword[int] identifier[LA182_55] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred286_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[alt182] operator[=] Other[1] operator[SEP]
}
}
Keyword[break] operator[SEP]
}
}
Keyword[switch] operator[SEP] identifier[alt182] operator[SEP] {
Keyword[case] Other[1] operator[:] {
identifier[match] operator[SEP] identifier[input] , Other[59] , identifier[FOLLOW_59_in_arrayCreatorRest6139] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] identifier[pushFollow] operator[SEP] identifier[FOLLOW_expression_in_arrayCreatorRest6141] operator[SEP] operator[SEP] identifier[expression] 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] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[60] , identifier[FOLLOW_60_in_arrayCreatorRest6143] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[loop182] operator[SEP]
}
}
identifier[loop183] operator[:] Keyword[while] operator[SEP] literal[boolean] operator[SEP] {
Keyword[int] identifier[alt183] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA183_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA183_0] operator[==] Other[59] operator[SEP] operator[SEP] {
Keyword[int] identifier[LA183_30] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA183_30] operator[==] Other[60] operator[SEP] operator[SEP] {
identifier[alt183] operator[=] Other[1] operator[SEP]
}
}
Keyword[switch] operator[SEP] identifier[alt183] operator[SEP] {
Keyword[case] Other[1] operator[:] {
identifier[match] operator[SEP] identifier[input] , Other[59] , identifier[FOLLOW_59_in_arrayCreatorRest6148] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[60] , identifier[FOLLOW_60_in_arrayCreatorRest6150] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[loop183] operator[SEP]
}
}
}
Keyword[break] operator[SEP]
}
}
}
Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] {
identifier[reportError] operator[SEP] identifier[re] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP]
}
Keyword[finally] {
Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] {
identifier[memoize] operator[SEP] identifier[input] , Other[133] , identifier[arrayCreatorRest_StartIndex] operator[SEP] operator[SEP]
}
}
}
|
private void drawRect(Color color, int startX, int startY, int width,
int height) {
assert color != null;
for (int x = startX; x < startX + width; x++) {
for (int y = startY; y < startY + height; y++) {
try {
image.setRGB(x, y, color.getRGB());
} catch (ArrayIndexOutOfBoundsException e) {
logger.warn("tried to set x/y = " + x + "/" + y);
}
}
}
} | class class_name[name] begin[{]
method[drawRect, return_type[void], modifier[private], parameter[color, startX, startY, width, height]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=color, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None)
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getRGB, postfix_operators=[], prefix_operators=[], qualifier=color, selectors=[], type_arguments=None)], member=setRGB, postfix_operators=[], prefix_operators=[], qualifier=image, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="tried to set x/y = "), operandr=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operator=+), operandr=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ArrayIndexOutOfBoundsException']))], finally_block=None, label=None, resources=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=startY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=startY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=y)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=y, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=startX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=startX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=x)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=x, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
end[}]
END[}] | Keyword[private] Keyword[void] identifier[drawRect] operator[SEP] identifier[Color] identifier[color] , Keyword[int] identifier[startX] , Keyword[int] identifier[startY] , Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] {
Keyword[assert] identifier[color] operator[!=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[x] operator[=] identifier[startX] operator[SEP] identifier[x] operator[<] identifier[startX] operator[+] identifier[width] operator[SEP] identifier[x] operator[++] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[y] operator[=] identifier[startY] operator[SEP] identifier[y] operator[<] identifier[startY] operator[+] identifier[height] operator[SEP] identifier[y] operator[++] operator[SEP] {
Keyword[try] {
identifier[image] operator[SEP] identifier[setRGB] operator[SEP] identifier[x] , identifier[y] , identifier[color] operator[SEP] identifier[getRGB] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[ArrayIndexOutOfBoundsException] identifier[e] operator[SEP] {
identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[x] operator[+] literal[String] operator[+] identifier[y] operator[SEP] operator[SEP]
}
}
}
}
|
public TaskInProgress getTip(TaskID tipid) {
JobInProgressTraits job = getJobInProgress(tipid.getJobID());
return (job == null ? null : job.getTaskInProgress(tipid));
} | class class_name[name] begin[{]
method[getTip, return_type[type[TaskInProgress]], modifier[public], parameter[tipid]] begin[{]
local_variable[type[JobInProgressTraits], job]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=job, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=tipid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTaskInProgress, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))]
end[}]
END[}] | Keyword[public] identifier[TaskInProgress] identifier[getTip] operator[SEP] identifier[TaskID] identifier[tipid] operator[SEP] {
identifier[JobInProgressTraits] identifier[job] operator[=] identifier[getJobInProgress] operator[SEP] identifier[tipid] operator[SEP] identifier[getJobID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[job] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[job] operator[SEP] identifier[getTaskInProgress] operator[SEP] identifier[tipid] operator[SEP] operator[SEP] operator[SEP]
}
|
@Override
public Appender getAppender(String name) {
if (aai == null || name == null)
return null;
return aai.getAppender(name);
} | class class_name[name] begin[{]
method[getAppender, return_type[type[Appender]], modifier[public], parameter[name]] begin[{]
if[binary_operation[binary_operation[member[.aai], ==, literal[null]], ||, binary_operation[member[.name], ==, literal[null]]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
return[call[aai.getAppender, parameter[member[.name]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Appender] identifier[getAppender] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[if] operator[SEP] identifier[aai] operator[==] Other[null] operator[||] identifier[name] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[aai] operator[SEP] identifier[getAppender] operator[SEP] identifier[name] operator[SEP] operator[SEP]
}
|
public double fBeta(double beta, EvaluationAveraging averaging) {
if(getNumRowCounter() == 0.0){
return Double.NaN; //No data
}
int nClasses = confusion().getClasses().size();
if (nClasses == 2) {
return EvaluationUtils.fBeta(beta, (long) truePositives.getCount(1), (long) falsePositives.getCount(1),
(long) falseNegatives.getCount(1));
}
if (averaging == EvaluationAveraging.Macro) {
double macroFBeta = 0.0;
int count = 0;
for (int i = 0; i < nClasses; i++) {
double thisFBeta = fBeta(beta, i, -1);
if (thisFBeta != -1) {
macroFBeta += thisFBeta;
count++;
}
}
macroFBeta /= count;
return macroFBeta;
} else if (averaging == EvaluationAveraging.Micro) {
long tpCount = 0;
long fpCount = 0;
long fnCount = 0;
for (int i = 0; i < nClasses; i++) {
tpCount += truePositives.getCount(i);
fpCount += falsePositives.getCount(i);
fnCount += falseNegatives.getCount(i);
}
return EvaluationUtils.fBeta(beta, tpCount, fpCount, fnCount);
} else {
throw new UnsupportedOperationException("Unknown averaging approach: " + averaging);
}
} | class class_name[name] begin[{]
method[fBeta, return_type[type[double]], modifier[public], parameter[beta, averaging]] begin[{]
if[binary_operation[call[.getNumRowCounter, parameter[]], ==, literal[0.0]]] begin[{]
return[member[Double.NaN]]
else begin[{]
None
end[}]
local_variable[type[int], nClasses]
if[binary_operation[member[.nClasses], ==, literal[2]]] begin[{]
return[call[EvaluationUtils.fBeta, parameter[member[.beta], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=getCount, postfix_operators=[], prefix_operators=[], qualifier=truePositives, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=long)), Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=getCount, postfix_operators=[], prefix_operators=[], qualifier=falsePositives, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=long)), Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=getCount, postfix_operators=[], prefix_operators=[], qualifier=falseNegatives, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=long))]]]
else begin[{]
None
end[}]
if[binary_operation[member[.averaging], ==, member[EvaluationAveraging.Macro]]] begin[{]
local_variable[type[double], macroFBeta]
local_variable[type[int], count]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=beta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], member=fBeta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=thisFBeta)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=thisFBeta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=macroFBeta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=thisFBeta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MemberReference(member=count, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nClasses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
assign[member[.macroFBeta], member[.count]]
return[member[.macroFBeta]]
else begin[{]
if[binary_operation[member[.averaging], ==, member[EvaluationAveraging.Micro]]] begin[{]
local_variable[type[long], tpCount]
local_variable[type[long], fpCount]
local_variable[type[long], fnCount]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=tpCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCount, postfix_operators=[], prefix_operators=[], qualifier=truePositives, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=fpCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCount, postfix_operators=[], prefix_operators=[], qualifier=falsePositives, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=fnCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCount, postfix_operators=[], prefix_operators=[], qualifier=falseNegatives, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nClasses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
return[call[EvaluationUtils.fBeta, parameter[member[.beta], member[.tpCount], member[.fpCount], member[.fnCount]]]]
else begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown averaging approach: "), operandr=MemberReference(member=averaging, 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=UnsupportedOperationException, sub_type=None)), label=None)
end[}]
end[}]
end[}]
END[}] | Keyword[public] Keyword[double] identifier[fBeta] operator[SEP] Keyword[double] identifier[beta] , identifier[EvaluationAveraging] identifier[averaging] operator[SEP] {
Keyword[if] operator[SEP] identifier[getNumRowCounter] operator[SEP] operator[SEP] operator[==] literal[Float] operator[SEP] {
Keyword[return] identifier[Double] operator[SEP] identifier[NaN] operator[SEP]
}
Keyword[int] identifier[nClasses] operator[=] identifier[confusion] operator[SEP] operator[SEP] operator[SEP] identifier[getClasses] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nClasses] operator[==] Other[2] operator[SEP] {
Keyword[return] identifier[EvaluationUtils] operator[SEP] identifier[fBeta] operator[SEP] identifier[beta] , operator[SEP] Keyword[long] operator[SEP] identifier[truePositives] operator[SEP] identifier[getCount] operator[SEP] Other[1] operator[SEP] , operator[SEP] Keyword[long] operator[SEP] identifier[falsePositives] operator[SEP] identifier[getCount] operator[SEP] Other[1] operator[SEP] , operator[SEP] Keyword[long] operator[SEP] identifier[falseNegatives] operator[SEP] identifier[getCount] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[averaging] operator[==] identifier[EvaluationAveraging] operator[SEP] identifier[Macro] operator[SEP] {
Keyword[double] identifier[macroFBeta] operator[=] literal[Float] operator[SEP] Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[nClasses] operator[SEP] identifier[i] operator[++] operator[SEP] {
Keyword[double] identifier[thisFBeta] operator[=] identifier[fBeta] operator[SEP] identifier[beta] , identifier[i] , operator[-] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[thisFBeta] operator[!=] operator[-] Other[1] operator[SEP] {
identifier[macroFBeta] operator[+=] identifier[thisFBeta] operator[SEP] identifier[count] operator[++] operator[SEP]
}
}
identifier[macroFBeta] operator[/=] identifier[count] operator[SEP] Keyword[return] identifier[macroFBeta] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[averaging] operator[==] identifier[EvaluationAveraging] operator[SEP] identifier[Micro] operator[SEP] {
Keyword[long] identifier[tpCount] operator[=] Other[0] operator[SEP] Keyword[long] identifier[fpCount] operator[=] Other[0] operator[SEP] Keyword[long] identifier[fnCount] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[nClasses] operator[SEP] identifier[i] operator[++] operator[SEP] {
identifier[tpCount] operator[+=] identifier[truePositives] operator[SEP] identifier[getCount] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[fpCount] operator[+=] identifier[falsePositives] operator[SEP] identifier[getCount] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[fnCount] operator[+=] identifier[falseNegatives] operator[SEP] identifier[getCount] operator[SEP] identifier[i] operator[SEP] operator[SEP]
}
Keyword[return] identifier[EvaluationUtils] operator[SEP] identifier[fBeta] operator[SEP] identifier[beta] , identifier[tpCount] , identifier[fpCount] , identifier[fnCount] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[+] identifier[averaging] operator[SEP] operator[SEP]
}
}
|
public static StackManipulation of(TypeDescription typeDescription) {
if (typeDescription.isPrimitive()) {
throw new IllegalArgumentException("Cannot check an instance against a primitive type: " + typeDescription);
}
return new InstanceCheck(typeDescription);
} | class class_name[name] begin[{]
method[of, return_type[type[StackManipulation]], modifier[public static], parameter[typeDescription]] begin[{]
if[call[typeDescription.isPrimitive, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot check an instance against a primitive type: "), operandr=MemberReference(member=typeDescription, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)
else begin[{]
None
end[}]
return[ClassCreator(arguments=[MemberReference(member=typeDescription, 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=InstanceCheck, sub_type=None))]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[StackManipulation] identifier[of] operator[SEP] identifier[TypeDescription] identifier[typeDescription] operator[SEP] {
Keyword[if] operator[SEP] identifier[typeDescription] operator[SEP] identifier[isPrimitive] operator[SEP] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[typeDescription] operator[SEP] operator[SEP]
}
Keyword[return] Keyword[new] identifier[InstanceCheck] operator[SEP] identifier[typeDescription] operator[SEP] operator[SEP]
}
|
public final Operation startIPRotation(String projectId, String zone, String clusterId) {
StartIPRotationRequest request =
StartIPRotationRequest.newBuilder()
.setProjectId(projectId)
.setZone(zone)
.setClusterId(clusterId)
.build();
return startIPRotation(request);
} | class class_name[name] begin[{]
method[startIPRotation, return_type[type[Operation]], modifier[final public], parameter[projectId, zone, clusterId]] begin[{]
local_variable[type[StartIPRotationRequest], request]
return[call[.startIPRotation, parameter[member[.request]]]]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[Operation] identifier[startIPRotation] operator[SEP] identifier[String] identifier[projectId] , identifier[String] identifier[zone] , identifier[String] identifier[clusterId] operator[SEP] {
identifier[StartIPRotationRequest] identifier[request] operator[=] identifier[StartIPRotationRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setProjectId] operator[SEP] identifier[projectId] operator[SEP] operator[SEP] identifier[setZone] operator[SEP] identifier[zone] operator[SEP] operator[SEP] identifier[setClusterId] operator[SEP] identifier[clusterId] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[startIPRotation] operator[SEP] identifier[request] operator[SEP] operator[SEP]
}
|
private void initComponents()//GEN-BEGIN:initComponents
{
java.awt.GridBagConstraints gridBagConstraints;
jPanel1 = new javax.swing.JPanel();
lblEnabled = new javax.swing.JLabel();
cbEnabled = new javax.swing.JCheckBox();
lblDisabledByParent = new javax.swing.JLabel();
cbDisabledByParent = new javax.swing.JCheckBox();
jLabel4 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
lblPKTableName = new javax.swing.JLabel();
tfPKTableName = new javax.swing.JTextField();
lblFKTableName = new javax.swing.JLabel();
tfFKTableName = new javax.swing.JTextField();
lblReferenceType = new javax.swing.JLabel();
tfReferenceType = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
lblAutoRetrieve = new javax.swing.JLabel();
cbAutoRetrieve = new javax.swing.JCheckBox();
lblAutoUpdate = new javax.swing.JLabel();
cbAutoUpdate = new javax.swing.JCheckBox();
lblAutoDelete = new javax.swing.JLabel();
cbAutoDelete = new javax.swing.JCheckBox();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
lblJavaFieldName = new javax.swing.JLabel();
tfJavaFieldName = new javax.swing.JTextField();
lblJavaFieldType = new javax.swing.JLabel();
tfJavaFieldType = new javax.swing.JTextField();
setLayout(new java.awt.GridBagLayout());
addComponentListener(new java.awt.event.ComponentAdapter()
{
public void componentShown(java.awt.event.ComponentEvent evt)
{
formComponentShown(evt);
}
public void componentHidden(java.awt.event.ComponentEvent evt)
{
formComponentHidden(evt);
}
});
addHierarchyListener(new java.awt.event.HierarchyListener()
{
public void hierarchyChanged(java.awt.event.HierarchyEvent evt)
{
formHierarchyChanged(evt);
}
});
jPanel1.setLayout(new java.awt.GridLayout(15, 2));
lblEnabled.setDisplayedMnemonic('e');
lblEnabled.setText("enabled:");
jPanel1.add(lblEnabled);
cbEnabled.setMnemonic('e');
cbEnabled.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
cbEnabledActionPerformed(evt);
}
});
jPanel1.add(cbEnabled);
lblDisabledByParent.setText("disabled by parent:");
jPanel1.add(lblDisabledByParent);
cbDisabledByParent.setEnabled(false);
jPanel1.add(cbDisabledByParent);
jPanel1.add(jLabel4);
jPanel1.add(jLabel3);
lblPKTableName.setLabelFor(tfPKTableName);
lblPKTableName.setText("Primary Key Table:");
jPanel1.add(lblPKTableName);
tfPKTableName.setEditable(false);
tfPKTableName.setText("jTextField1");
tfPKTableName.setBorder(null);
tfPKTableName.setDisabledTextColor((java.awt.Color) javax.swing.UIManager.getDefaults().get("TextField.foreground"));
tfPKTableName.setEnabled(false);
jPanel1.add(tfPKTableName);
lblFKTableName.setLabelFor(tfFKTableName);
lblFKTableName.setText("Foreign Key Table:");
jPanel1.add(lblFKTableName);
tfFKTableName.setEditable(false);
tfFKTableName.setText("jTextField1");
tfFKTableName.setBorder(null);
tfFKTableName.setDisabledTextColor((java.awt.Color) javax.swing.UIManager.getDefaults().get("TextField.foreground"));
tfFKTableName.setEnabled(false);
jPanel1.add(tfFKTableName);
lblReferenceType.setLabelFor(tfReferenceType);
lblReferenceType.setText("Type:");
jPanel1.add(lblReferenceType);
tfReferenceType.setEditable(false);
tfReferenceType.setText("jTextField1");
tfReferenceType.setBorder(null);
tfReferenceType.setDisabledTextColor((java.awt.Color) javax.swing.UIManager.getDefaults().get("TextField.foreground"));
tfReferenceType.setEnabled(false);
jPanel1.add(tfReferenceType);
jPanel1.add(jLabel5);
jPanel1.add(jLabel6);
lblAutoRetrieve.setDisplayedMnemonic('r');
lblAutoRetrieve.setText("Auto retrieve:");
jPanel1.add(lblAutoRetrieve);
cbAutoRetrieve.setMnemonic('r');
cbAutoRetrieve.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
cbAutoRetrieveActionPerformed(evt);
}
});
jPanel1.add(cbAutoRetrieve);
lblAutoUpdate.setDisplayedMnemonic('u');
lblAutoUpdate.setText("Auto update:");
jPanel1.add(lblAutoUpdate);
cbAutoUpdate.setMnemonic('u');
cbAutoUpdate.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
cbAutoUpdateActionPerformed(evt);
}
});
jPanel1.add(cbAutoUpdate);
lblAutoDelete.setDisplayedMnemonic('d');
lblAutoDelete.setText("Auto delete:");
jPanel1.add(lblAutoDelete);
cbAutoDelete.setMnemonic('d');
cbAutoDelete.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
cbAutoDeleteActionPerformed(evt);
}
});
jPanel1.add(cbAutoDelete);
jPanel1.add(jLabel10);
jPanel1.add(jLabel11);
lblJavaFieldName.setDisplayedMnemonic('n');
lblJavaFieldName.setLabelFor(tfJavaFieldName);
lblJavaFieldName.setText("Java Field Name:");
jPanel1.add(lblJavaFieldName);
tfJavaFieldName.setText("jTextField1");
tfJavaFieldName.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
tfJavaFieldNameActionPerformed(evt);
}
});
tfJavaFieldName.addFocusListener(new java.awt.event.FocusAdapter()
{
public void focusLost(java.awt.event.FocusEvent evt)
{
tfJavaFieldNameFocusLost(evt);
}
});
tfJavaFieldName.addKeyListener(new java.awt.event.KeyAdapter()
{
public void keyTyped(java.awt.event.KeyEvent evt)
{
tfJavaFieldNameKeyTyped(evt);
}
});
jPanel1.add(tfJavaFieldName);
lblJavaFieldType.setDisplayedMnemonic('t');
lblJavaFieldType.setLabelFor(tfJavaFieldType);
lblJavaFieldType.setText("Java Field Type:");
jPanel1.add(lblJavaFieldType);
tfJavaFieldType.setText("jTextField2");
tfJavaFieldType.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
tfJavaFieldTypeActionPerformed(evt);
}
});
tfJavaFieldType.addFocusListener(new java.awt.event.FocusAdapter()
{
public void focusLost(java.awt.event.FocusEvent evt)
{
tfJavaFieldTypeFocusLost(evt);
}
});
tfJavaFieldType.addKeyListener(new java.awt.event.KeyAdapter()
{
public void keyTyped(java.awt.event.KeyEvent evt)
{
tfJavaFieldTypeKeyTyped(evt);
}
});
jPanel1.add(tfJavaFieldType);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
add(jPanel1, gridBagConstraints);
} | class class_name[name] begin[{]
method[initComponents, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[java], gridBagConstraints]
assign[member[.jPanel1], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JPanel, sub_type=None))))]
assign[member[.lblEnabled], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.cbEnabled], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JCheckBox, sub_type=None))))]
assign[member[.lblDisabledByParent], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.cbDisabledByParent], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JCheckBox, sub_type=None))))]
assign[member[.jLabel4], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.jLabel3], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.lblPKTableName], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.tfPKTableName], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JTextField, sub_type=None))))]
assign[member[.lblFKTableName], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.tfFKTableName], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JTextField, sub_type=None))))]
assign[member[.lblReferenceType], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.tfReferenceType], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JTextField, sub_type=None))))]
assign[member[.jLabel5], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.jLabel6], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.lblAutoRetrieve], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.cbAutoRetrieve], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JCheckBox, sub_type=None))))]
assign[member[.lblAutoUpdate], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.cbAutoUpdate], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JCheckBox, sub_type=None))))]
assign[member[.lblAutoDelete], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.cbAutoDelete], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JCheckBox, sub_type=None))))]
assign[member[.jLabel10], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.jLabel11], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.lblJavaFieldName], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.tfJavaFieldName], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JTextField, sub_type=None))))]
assign[member[.lblJavaFieldType], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))]
assign[member[.tfJavaFieldType], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JTextField, sub_type=None))))]
call[.setLayout, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=GridBagLayout, sub_type=None))))]]
call[.addComponentListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=formComponentShown, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=componentShown, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ComponentEvent, sub_type=None)))), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=formComponentHidden, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=componentHidden, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ComponentEvent, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ComponentAdapter, sub_type=None)))))]]
call[.addHierarchyListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=formHierarchyChanged, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=hierarchyChanged, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=HierarchyEvent, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=HierarchyListener, sub_type=None)))))]]
call[jPanel1.setLayout, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=15), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=GridLayout, sub_type=None))))]]
call[lblEnabled.setDisplayedMnemonic, parameter[literal['e']]]
call[lblEnabled.setText, parameter[literal["enabled:"]]]
call[jPanel1.add, parameter[member[.lblEnabled]]]
call[cbEnabled.setMnemonic, parameter[literal['e']]]
call[cbEnabled.addActionListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cbEnabledActionPerformed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=actionPerformed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionEvent, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionListener, sub_type=None)))))]]
call[jPanel1.add, parameter[member[.cbEnabled]]]
call[lblDisabledByParent.setText, parameter[literal["disabled by parent:"]]]
call[jPanel1.add, parameter[member[.lblDisabledByParent]]]
call[cbDisabledByParent.setEnabled, parameter[literal[false]]]
call[jPanel1.add, parameter[member[.cbDisabledByParent]]]
call[jPanel1.add, parameter[member[.jLabel4]]]
call[jPanel1.add, parameter[member[.jLabel3]]]
call[lblPKTableName.setLabelFor, parameter[member[.tfPKTableName]]]
call[lblPKTableName.setText, parameter[literal["Primary Key Table:"]]]
call[jPanel1.add, parameter[member[.lblPKTableName]]]
call[tfPKTableName.setEditable, parameter[literal[false]]]
call[tfPKTableName.setText, parameter[literal["jTextField1"]]]
call[tfPKTableName.setBorder, parameter[literal[null]]]
call[tfPKTableName.setDisabledTextColor, parameter[Cast(expression=MethodInvocation(arguments=[], member=getDefaults, postfix_operators=[], prefix_operators=[], qualifier=javax.swing.UIManager, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TextField.foreground")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=Color, sub_type=None))))]]
call[tfPKTableName.setEnabled, parameter[literal[false]]]
call[jPanel1.add, parameter[member[.tfPKTableName]]]
call[lblFKTableName.setLabelFor, parameter[member[.tfFKTableName]]]
call[lblFKTableName.setText, parameter[literal["Foreign Key Table:"]]]
call[jPanel1.add, parameter[member[.lblFKTableName]]]
call[tfFKTableName.setEditable, parameter[literal[false]]]
call[tfFKTableName.setText, parameter[literal["jTextField1"]]]
call[tfFKTableName.setBorder, parameter[literal[null]]]
call[tfFKTableName.setDisabledTextColor, parameter[Cast(expression=MethodInvocation(arguments=[], member=getDefaults, postfix_operators=[], prefix_operators=[], qualifier=javax.swing.UIManager, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TextField.foreground")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=Color, sub_type=None))))]]
call[tfFKTableName.setEnabled, parameter[literal[false]]]
call[jPanel1.add, parameter[member[.tfFKTableName]]]
call[lblReferenceType.setLabelFor, parameter[member[.tfReferenceType]]]
call[lblReferenceType.setText, parameter[literal["Type:"]]]
call[jPanel1.add, parameter[member[.lblReferenceType]]]
call[tfReferenceType.setEditable, parameter[literal[false]]]
call[tfReferenceType.setText, parameter[literal["jTextField1"]]]
call[tfReferenceType.setBorder, parameter[literal[null]]]
call[tfReferenceType.setDisabledTextColor, parameter[Cast(expression=MethodInvocation(arguments=[], member=getDefaults, postfix_operators=[], prefix_operators=[], qualifier=javax.swing.UIManager, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TextField.foreground")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=Color, sub_type=None))))]]
call[tfReferenceType.setEnabled, parameter[literal[false]]]
call[jPanel1.add, parameter[member[.tfReferenceType]]]
call[jPanel1.add, parameter[member[.jLabel5]]]
call[jPanel1.add, parameter[member[.jLabel6]]]
call[lblAutoRetrieve.setDisplayedMnemonic, parameter[literal['r']]]
call[lblAutoRetrieve.setText, parameter[literal["Auto retrieve:"]]]
call[jPanel1.add, parameter[member[.lblAutoRetrieve]]]
call[cbAutoRetrieve.setMnemonic, parameter[literal['r']]]
call[cbAutoRetrieve.addActionListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cbAutoRetrieveActionPerformed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=actionPerformed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionEvent, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionListener, sub_type=None)))))]]
call[jPanel1.add, parameter[member[.cbAutoRetrieve]]]
call[lblAutoUpdate.setDisplayedMnemonic, parameter[literal['u']]]
call[lblAutoUpdate.setText, parameter[literal["Auto update:"]]]
call[jPanel1.add, parameter[member[.lblAutoUpdate]]]
call[cbAutoUpdate.setMnemonic, parameter[literal['u']]]
call[cbAutoUpdate.addActionListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cbAutoUpdateActionPerformed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=actionPerformed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionEvent, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionListener, sub_type=None)))))]]
call[jPanel1.add, parameter[member[.cbAutoUpdate]]]
call[lblAutoDelete.setDisplayedMnemonic, parameter[literal['d']]]
call[lblAutoDelete.setText, parameter[literal["Auto delete:"]]]
call[jPanel1.add, parameter[member[.lblAutoDelete]]]
call[cbAutoDelete.setMnemonic, parameter[literal['d']]]
call[cbAutoDelete.addActionListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cbAutoDeleteActionPerformed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=actionPerformed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionEvent, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionListener, sub_type=None)))))]]
call[jPanel1.add, parameter[member[.cbAutoDelete]]]
call[jPanel1.add, parameter[member[.jLabel10]]]
call[jPanel1.add, parameter[member[.jLabel11]]]
call[lblJavaFieldName.setDisplayedMnemonic, parameter[literal['n']]]
call[lblJavaFieldName.setLabelFor, parameter[member[.tfJavaFieldName]]]
call[lblJavaFieldName.setText, parameter[literal["Java Field Name:"]]]
call[jPanel1.add, parameter[member[.lblJavaFieldName]]]
call[tfJavaFieldName.setText, parameter[literal["jTextField1"]]]
call[tfJavaFieldName.addActionListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tfJavaFieldNameActionPerformed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=actionPerformed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionEvent, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionListener, sub_type=None)))))]]
call[tfJavaFieldName.addFocusListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tfJavaFieldNameFocusLost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=focusLost, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=FocusEvent, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=FocusAdapter, sub_type=None)))))]]
call[tfJavaFieldName.addKeyListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tfJavaFieldNameKeyTyped, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=keyTyped, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=KeyEvent, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=KeyAdapter, sub_type=None)))))]]
call[jPanel1.add, parameter[member[.tfJavaFieldName]]]
call[lblJavaFieldType.setDisplayedMnemonic, parameter[literal['t']]]
call[lblJavaFieldType.setLabelFor, parameter[member[.tfJavaFieldType]]]
call[lblJavaFieldType.setText, parameter[literal["Java Field Type:"]]]
call[jPanel1.add, parameter[member[.lblJavaFieldType]]]
call[tfJavaFieldType.setText, parameter[literal["jTextField2"]]]
call[tfJavaFieldType.addActionListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tfJavaFieldTypeActionPerformed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=actionPerformed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionEvent, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionListener, sub_type=None)))))]]
call[tfJavaFieldType.addFocusListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tfJavaFieldTypeFocusLost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=focusLost, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=FocusEvent, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=FocusAdapter, sub_type=None)))))]]
call[tfJavaFieldType.addKeyListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tfJavaFieldTypeKeyTyped, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=keyTyped, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=KeyEvent, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=KeyAdapter, sub_type=None)))))]]
call[jPanel1.add, parameter[member[.tfJavaFieldType]]]
assign[member[.gridBagConstraints], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=GridBagConstraints, sub_type=None))))]
assign[member[gridBagConstraints.fill], member[java.awt.GridBagConstraints.HORIZONTAL]]
assign[member[gridBagConstraints.anchor], member[java.awt.GridBagConstraints.NORTH]]
assign[member[gridBagConstraints.weightx], literal[1.0]]
assign[member[gridBagConstraints.weighty], literal[1.0]]
call[.add, parameter[member[.jPanel1], member[.gridBagConstraints]]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[initComponents] operator[SEP] operator[SEP] {
identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] identifier[gridBagConstraints] operator[SEP] identifier[jPanel1] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JPanel] operator[SEP] operator[SEP] operator[SEP] identifier[lblEnabled] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[cbEnabled] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JCheckBox] operator[SEP] operator[SEP] operator[SEP] identifier[lblDisabledByParent] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[cbDisabledByParent] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JCheckBox] operator[SEP] operator[SEP] operator[SEP] identifier[jLabel4] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[jLabel3] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[lblPKTableName] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[tfPKTableName] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JTextField] operator[SEP] operator[SEP] operator[SEP] identifier[lblFKTableName] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[tfFKTableName] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JTextField] operator[SEP] operator[SEP] operator[SEP] identifier[lblReferenceType] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[tfReferenceType] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JTextField] operator[SEP] operator[SEP] operator[SEP] identifier[jLabel5] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[jLabel6] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[lblAutoRetrieve] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[cbAutoRetrieve] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JCheckBox] operator[SEP] operator[SEP] operator[SEP] identifier[lblAutoUpdate] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[cbAutoUpdate] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JCheckBox] operator[SEP] operator[SEP] operator[SEP] identifier[lblAutoDelete] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[cbAutoDelete] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JCheckBox] operator[SEP] operator[SEP] operator[SEP] identifier[jLabel10] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[jLabel11] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[lblJavaFieldName] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[tfJavaFieldName] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JTextField] operator[SEP] operator[SEP] operator[SEP] identifier[lblJavaFieldType] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[tfJavaFieldType] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JTextField] operator[SEP] operator[SEP] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagLayout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addComponentListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ComponentAdapter] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[componentShown] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ComponentEvent] identifier[evt] operator[SEP] {
identifier[formComponentShown] operator[SEP] identifier[evt] operator[SEP] operator[SEP]
}
Keyword[public] Keyword[void] identifier[componentHidden] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ComponentEvent] identifier[evt] operator[SEP] {
identifier[formComponentHidden] operator[SEP] identifier[evt] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] identifier[addHierarchyListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[HierarchyListener] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[hierarchyChanged] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[HierarchyEvent] identifier[evt] operator[SEP] {
identifier[formHierarchyChanged] operator[SEP] identifier[evt] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridLayout] operator[SEP] Other[15] , Other[2] operator[SEP] operator[SEP] operator[SEP] identifier[lblEnabled] operator[SEP] identifier[setDisplayedMnemonic] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[lblEnabled] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[lblEnabled] operator[SEP] operator[SEP] identifier[cbEnabled] operator[SEP] identifier[setMnemonic] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cbEnabled] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionListener] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] {
identifier[cbEnabledActionPerformed] operator[SEP] identifier[evt] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[cbEnabled] operator[SEP] operator[SEP] identifier[lblDisabledByParent] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[lblDisabledByParent] operator[SEP] operator[SEP] identifier[cbDisabledByParent] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[cbDisabledByParent] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[jLabel4] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[jLabel3] operator[SEP] operator[SEP] identifier[lblPKTableName] operator[SEP] identifier[setLabelFor] operator[SEP] identifier[tfPKTableName] operator[SEP] operator[SEP] identifier[lblPKTableName] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[lblPKTableName] operator[SEP] operator[SEP] identifier[tfPKTableName] operator[SEP] identifier[setEditable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[tfPKTableName] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[tfPKTableName] operator[SEP] identifier[setBorder] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[tfPKTableName] operator[SEP] identifier[setDisabledTextColor] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Color] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[UIManager] operator[SEP] identifier[getDefaults] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[tfPKTableName] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[tfPKTableName] operator[SEP] operator[SEP] identifier[lblFKTableName] operator[SEP] identifier[setLabelFor] operator[SEP] identifier[tfFKTableName] operator[SEP] operator[SEP] identifier[lblFKTableName] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[lblFKTableName] operator[SEP] operator[SEP] identifier[tfFKTableName] operator[SEP] identifier[setEditable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[tfFKTableName] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[tfFKTableName] operator[SEP] identifier[setBorder] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[tfFKTableName] operator[SEP] identifier[setDisabledTextColor] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Color] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[UIManager] operator[SEP] identifier[getDefaults] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[tfFKTableName] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[tfFKTableName] operator[SEP] operator[SEP] identifier[lblReferenceType] operator[SEP] identifier[setLabelFor] operator[SEP] identifier[tfReferenceType] operator[SEP] operator[SEP] identifier[lblReferenceType] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[lblReferenceType] operator[SEP] operator[SEP] identifier[tfReferenceType] operator[SEP] identifier[setEditable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[tfReferenceType] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[tfReferenceType] operator[SEP] identifier[setBorder] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[tfReferenceType] operator[SEP] identifier[setDisabledTextColor] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Color] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[UIManager] operator[SEP] identifier[getDefaults] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[tfReferenceType] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[tfReferenceType] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[jLabel5] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[jLabel6] operator[SEP] operator[SEP] identifier[lblAutoRetrieve] operator[SEP] identifier[setDisplayedMnemonic] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[lblAutoRetrieve] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[lblAutoRetrieve] operator[SEP] operator[SEP] identifier[cbAutoRetrieve] operator[SEP] identifier[setMnemonic] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cbAutoRetrieve] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionListener] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] {
identifier[cbAutoRetrieveActionPerformed] operator[SEP] identifier[evt] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[cbAutoRetrieve] operator[SEP] operator[SEP] identifier[lblAutoUpdate] operator[SEP] identifier[setDisplayedMnemonic] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[lblAutoUpdate] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[lblAutoUpdate] operator[SEP] operator[SEP] identifier[cbAutoUpdate] operator[SEP] identifier[setMnemonic] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cbAutoUpdate] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionListener] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] {
identifier[cbAutoUpdateActionPerformed] operator[SEP] identifier[evt] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[cbAutoUpdate] operator[SEP] operator[SEP] identifier[lblAutoDelete] operator[SEP] identifier[setDisplayedMnemonic] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[lblAutoDelete] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[lblAutoDelete] operator[SEP] operator[SEP] identifier[cbAutoDelete] operator[SEP] identifier[setMnemonic] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cbAutoDelete] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionListener] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] {
identifier[cbAutoDeleteActionPerformed] operator[SEP] identifier[evt] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[cbAutoDelete] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[jLabel10] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[jLabel11] operator[SEP] operator[SEP] identifier[lblJavaFieldName] operator[SEP] identifier[setDisplayedMnemonic] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[lblJavaFieldName] operator[SEP] identifier[setLabelFor] operator[SEP] identifier[tfJavaFieldName] operator[SEP] operator[SEP] identifier[lblJavaFieldName] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[lblJavaFieldName] operator[SEP] operator[SEP] identifier[tfJavaFieldName] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[tfJavaFieldName] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionListener] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] {
identifier[tfJavaFieldNameActionPerformed] operator[SEP] identifier[evt] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] identifier[tfJavaFieldName] operator[SEP] identifier[addFocusListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[FocusAdapter] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[focusLost] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[FocusEvent] identifier[evt] operator[SEP] {
identifier[tfJavaFieldNameFocusLost] operator[SEP] identifier[evt] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] identifier[tfJavaFieldName] operator[SEP] identifier[addKeyListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[KeyAdapter] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[keyTyped] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[KeyEvent] identifier[evt] operator[SEP] {
identifier[tfJavaFieldNameKeyTyped] operator[SEP] identifier[evt] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[tfJavaFieldName] operator[SEP] operator[SEP] identifier[lblJavaFieldType] operator[SEP] identifier[setDisplayedMnemonic] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[lblJavaFieldType] operator[SEP] identifier[setLabelFor] operator[SEP] identifier[tfJavaFieldType] operator[SEP] operator[SEP] identifier[lblJavaFieldType] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[lblJavaFieldType] operator[SEP] operator[SEP] identifier[tfJavaFieldType] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[tfJavaFieldType] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionListener] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] {
identifier[tfJavaFieldTypeActionPerformed] operator[SEP] identifier[evt] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] identifier[tfJavaFieldType] operator[SEP] identifier[addFocusListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[FocusAdapter] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[focusLost] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[FocusEvent] identifier[evt] operator[SEP] {
identifier[tfJavaFieldTypeFocusLost] operator[SEP] identifier[evt] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] identifier[tfJavaFieldType] operator[SEP] identifier[addKeyListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[KeyAdapter] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[keyTyped] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[KeyEvent] identifier[evt] operator[SEP] {
identifier[tfJavaFieldTypeKeyTyped] operator[SEP] identifier[evt] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] identifier[jPanel1] operator[SEP] identifier[add] operator[SEP] identifier[tfJavaFieldType] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[fill] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] identifier[HORIZONTAL] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[anchor] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] identifier[NORTH] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[weighty] operator[=] literal[Float] operator[SEP] identifier[add] operator[SEP] identifier[jPanel1] , identifier[gridBagConstraints] operator[SEP] operator[SEP]
}
|
protected final void resetLevel(BioPAXLevel level, BioPAXFactory factory)
{
this.level = (level != null) ? level : BioPAXLevel.L3;
this.factory = (factory != null) ? factory : this.level.getDefaultFactory();
// default flags
if (this.level == BioPAXLevel.L2)
{
this.fixReusedPEPs = true;
}
bp = this.level.getNameSpace();
resetEditorMap(); //implemented by concrete subclasses
} | class class_name[name] begin[{]
method[resetLevel, return_type[void], modifier[final protected], parameter[level, factory]] begin[{]
assign[THIS[member[None.level]], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=level, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MemberReference(member=L3, postfix_operators=[], prefix_operators=[], qualifier=BioPAXLevel, selectors=[]), if_true=MemberReference(member=level, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]
assign[THIS[member[None.factory]], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=level, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getDefaultFactory, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), if_true=MemberReference(member=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]
if[binary_operation[THIS[member[None.level]], ==, member[BioPAXLevel.L2]]] begin[{]
assign[THIS[member[None.fixReusedPEPs]], literal[true]]
else begin[{]
None
end[}]
assign[member[.bp], THIS[member[None.level]call[None.getNameSpace, parameter[]]]]
call[.resetEditorMap, parameter[]]
end[}]
END[}] | Keyword[protected] Keyword[final] Keyword[void] identifier[resetLevel] operator[SEP] identifier[BioPAXLevel] identifier[level] , identifier[BioPAXFactory] identifier[factory] operator[SEP] {
Keyword[this] operator[SEP] identifier[level] operator[=] operator[SEP] identifier[level] operator[!=] Other[null] operator[SEP] operator[?] identifier[level] operator[:] identifier[BioPAXLevel] operator[SEP] identifier[L3] operator[SEP] Keyword[this] operator[SEP] identifier[factory] operator[=] operator[SEP] identifier[factory] operator[!=] Other[null] operator[SEP] operator[?] identifier[factory] operator[:] Keyword[this] operator[SEP] identifier[level] operator[SEP] identifier[getDefaultFactory] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[level] operator[==] identifier[BioPAXLevel] operator[SEP] identifier[L2] operator[SEP] {
Keyword[this] operator[SEP] identifier[fixReusedPEPs] operator[=] literal[boolean] operator[SEP]
}
identifier[bp] operator[=] Keyword[this] operator[SEP] identifier[level] operator[SEP] identifier[getNameSpace] operator[SEP] operator[SEP] operator[SEP] identifier[resetEditorMap] operator[SEP] operator[SEP] operator[SEP]
}
|
public String getRestUrl(String urlKey, Boolean addClientId) throws UnsupportedEncodingException {
return getRestUrl(urlKey, addClientId, null, null);
} | class class_name[name] begin[{]
method[getRestUrl, return_type[type[String]], modifier[public], parameter[urlKey, addClientId]] begin[{]
return[call[.getRestUrl, parameter[member[.urlKey], member[.addClientId], literal[null], literal[null]]]]
end[}]
END[}] | Keyword[public] identifier[String] identifier[getRestUrl] operator[SEP] identifier[String] identifier[urlKey] , identifier[Boolean] identifier[addClientId] operator[SEP] Keyword[throws] identifier[UnsupportedEncodingException] {
Keyword[return] identifier[getRestUrl] operator[SEP] identifier[urlKey] , identifier[addClientId] , Other[null] , Other[null] operator[SEP] operator[SEP]
}
|
@Override
public void bindView(SimpleImageItem.ViewHolder viewHolder, List<Object> payloads) {
super.bindView(viewHolder, payloads);
//get the context
Context ctx = viewHolder.itemView.getContext();
//define our data for the view
viewHolder.imageName.setText(mName);
viewHolder.imageDescription.setText(mDescription);
viewHolder.imageView.setImageBitmap(null);
//set the background for the item
int color = UIUtils.getThemeColor(ctx, R.attr.colorPrimary);
viewHolder.view.clearAnimation();
viewHolder.view.setForeground(FastAdapterUIUtils.getSelectablePressedBackground(ctx, FastAdapterUIUtils.adjustAlpha(color, 100), 50, true));
//load glide
Glide.clear(viewHolder.imageView);
Glide.with(ctx).load(mImageUrl).animate(R.anim.alpha_on).into(viewHolder.imageView);
} | class class_name[name] begin[{]
method[bindView, return_type[void], modifier[public], parameter[viewHolder, payloads]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=viewHolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=payloads, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=bindView, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
local_variable[type[Context], ctx]
call[viewHolder.imageName.setText, parameter[member[.mName]]]
call[viewHolder.imageDescription.setText, parameter[member[.mDescription]]]
call[viewHolder.imageView.setImageBitmap, parameter[literal[null]]]
local_variable[type[int], color]
call[viewHolder.view.clearAnimation, parameter[]]
call[viewHolder.view.setForeground, parameter[call[FastAdapterUIUtils.getSelectablePressedBackground, parameter[member[.ctx], call[FastAdapterUIUtils.adjustAlpha, parameter[member[.color], literal[100]]], literal[50], literal[true]]]]]
call[Glide.clear, parameter[member[viewHolder.imageView]]]
call[Glide.with, parameter[member[.ctx]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[bindView] operator[SEP] identifier[SimpleImageItem] operator[SEP] identifier[ViewHolder] identifier[viewHolder] , identifier[List] operator[<] identifier[Object] operator[>] identifier[payloads] operator[SEP] {
Keyword[super] operator[SEP] identifier[bindView] operator[SEP] identifier[viewHolder] , identifier[payloads] operator[SEP] operator[SEP] identifier[Context] identifier[ctx] operator[=] identifier[viewHolder] operator[SEP] identifier[itemView] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[viewHolder] operator[SEP] identifier[imageName] operator[SEP] identifier[setText] operator[SEP] identifier[mName] operator[SEP] operator[SEP] identifier[viewHolder] operator[SEP] identifier[imageDescription] operator[SEP] identifier[setText] operator[SEP] identifier[mDescription] operator[SEP] operator[SEP] identifier[viewHolder] operator[SEP] identifier[imageView] operator[SEP] identifier[setImageBitmap] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[int] identifier[color] operator[=] identifier[UIUtils] operator[SEP] identifier[getThemeColor] operator[SEP] identifier[ctx] , identifier[R] operator[SEP] identifier[attr] operator[SEP] identifier[colorPrimary] operator[SEP] operator[SEP] identifier[viewHolder] operator[SEP] identifier[view] operator[SEP] identifier[clearAnimation] operator[SEP] operator[SEP] operator[SEP] identifier[viewHolder] operator[SEP] identifier[view] operator[SEP] identifier[setForeground] operator[SEP] identifier[FastAdapterUIUtils] operator[SEP] identifier[getSelectablePressedBackground] operator[SEP] identifier[ctx] , identifier[FastAdapterUIUtils] operator[SEP] identifier[adjustAlpha] operator[SEP] identifier[color] , Other[100] operator[SEP] , Other[50] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] identifier[Glide] operator[SEP] identifier[clear] operator[SEP] identifier[viewHolder] operator[SEP] identifier[imageView] operator[SEP] operator[SEP] identifier[Glide] operator[SEP] identifier[with] operator[SEP] identifier[ctx] operator[SEP] operator[SEP] identifier[load] operator[SEP] identifier[mImageUrl] operator[SEP] operator[SEP] identifier[animate] operator[SEP] identifier[R] operator[SEP] identifier[anim] operator[SEP] identifier[alpha_on] operator[SEP] operator[SEP] identifier[into] operator[SEP] identifier[viewHolder] operator[SEP] identifier[imageView] operator[SEP] operator[SEP]
}
|
public CertificateBundle restoreCertificate(String vaultBaseUrl, byte[] certificateBundleBackup) {
return restoreCertificateWithServiceResponseAsync(vaultBaseUrl, certificateBundleBackup).toBlocking().single().body();
} | class class_name[name] begin[{]
method[restoreCertificate, return_type[type[CertificateBundle]], modifier[public], parameter[vaultBaseUrl, certificateBundleBackup]] begin[{]
return[call[.restoreCertificateWithServiceResponseAsync, parameter[member[.vaultBaseUrl], member[.certificateBundleBackup]]]]
end[}]
END[}] | Keyword[public] identifier[CertificateBundle] identifier[restoreCertificate] operator[SEP] identifier[String] identifier[vaultBaseUrl] , Keyword[byte] operator[SEP] operator[SEP] identifier[certificateBundleBackup] operator[SEP] {
Keyword[return] identifier[restoreCertificateWithServiceResponseAsync] operator[SEP] identifier[vaultBaseUrl] , identifier[certificateBundleBackup] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP]
}
|
public void removeAllCssProperties() {
final long stamp = lock.writeLock();
try {
cssProperties.clear();
abstractCssPropertyClassObjects.clear();
super.removeAllFromAttributeValueMap();
} finally {
lock.unlockWrite(stamp);
}
} | class class_name[name] begin[{]
method[removeAllCssProperties, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[long], stamp]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=cssProperties, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=abstractCssPropertyClassObjects, selectors=[], type_arguments=None), label=None), StatementExpression(expression=SuperMethodInvocation(arguments=[], member=removeAllFromAttributeValueMap, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stamp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unlockWrite, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[], type_arguments=None), label=None)], label=None, resources=None)
end[}]
END[}] | Keyword[public] Keyword[void] identifier[removeAllCssProperties] operator[SEP] operator[SEP] {
Keyword[final] Keyword[long] identifier[stamp] operator[=] identifier[lock] operator[SEP] identifier[writeLock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[cssProperties] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[abstractCssPropertyClassObjects] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[removeAllFromAttributeValueMap] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[finally] {
identifier[lock] operator[SEP] identifier[unlockWrite] operator[SEP] identifier[stamp] operator[SEP] operator[SEP]
}
}
|
public List<List<LatLng>> getLatLngs() {
List<List<LatLng>> points = new ArrayList<>();
if (geometry != null) {
for (List<Point> coordinates : geometry.coordinates()) {
List<LatLng> innerList = new ArrayList<>();
for (Point point : coordinates) {
innerList.add(new LatLng(point.latitude(), point.longitude()));
}
points.add(innerList);
}
}
return points;
} | class class_name[name] begin[{]
method[getLatLngs, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], points]
if[binary_operation[member[.geometry], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), name=innerList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=LatLng, sub_type=None))], dimensions=[], name=List, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=latitude, postfix_operators=[], prefix_operators=[], qualifier=point, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=longitude, postfix_operators=[], prefix_operators=[], qualifier=point, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LatLng, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=innerList, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=coordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=point)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=innerList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=points, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=coordinates, postfix_operators=[], prefix_operators=[], qualifier=geometry, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=coordinates)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None))], dimensions=[], name=List, sub_type=None))), label=None)
else begin[{]
None
end[}]
return[member[.points]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[List] operator[<] identifier[LatLng] operator[>] operator[>] identifier[getLatLngs] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[List] operator[<] identifier[LatLng] operator[>] operator[>] identifier[points] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[geometry] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] identifier[List] operator[<] identifier[Point] operator[>] identifier[coordinates] operator[:] identifier[geometry] operator[SEP] identifier[coordinates] operator[SEP] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[LatLng] operator[>] identifier[innerList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Point] identifier[point] operator[:] identifier[coordinates] operator[SEP] {
identifier[innerList] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[LatLng] operator[SEP] identifier[point] operator[SEP] identifier[latitude] operator[SEP] operator[SEP] , identifier[point] operator[SEP] identifier[longitude] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
identifier[points] operator[SEP] identifier[add] operator[SEP] identifier[innerList] operator[SEP] operator[SEP]
}
}
Keyword[return] identifier[points] operator[SEP]
}
|
private static void populateMultiPartitionWorkUnit(List<KafkaPartition> partitions, WorkUnit workUnit) {
Preconditions.checkArgument(!partitions.isEmpty(), "There should be at least one partition");
GobblinMetrics.addCustomTagToState(workUnit, new Tag<>("kafkaTopic", partitions.get(0).getTopicName()));
for (int i = 0; i < partitions.size(); i++) {
workUnit.setProp(KafkaUtils.getPartitionPropName(KafkaSource.PARTITION_ID, i), partitions.get(i).getId());
workUnit.setProp(KafkaUtils.getPartitionPropName(KafkaSource.LEADER_ID, i),
partitions.get(i).getLeader().getId());
workUnit.setProp(KafkaUtils.getPartitionPropName(KafkaSource.LEADER_HOSTANDPORT, i),
partitions.get(i).getLeader().getHostAndPort());
}
} | class class_name[name] begin[{]
method[populateMultiPartitionWorkUnit, return_type[void], modifier[private static], parameter[partitions, workUnit]] begin[{]
call[Preconditions.checkArgument, parameter[call[partitions.isEmpty, parameter[]], literal["There should be at least one partition"]]]
call[GobblinMetrics.addCustomTagToState, parameter[member[.workUnit], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="kafkaTopic"), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=partitions, selectors=[MethodInvocation(arguments=[], member=getTopicName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=Tag, sub_type=None))]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=PARTITION_ID, postfix_operators=[], prefix_operators=[], qualifier=KafkaSource, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPartitionPropName, postfix_operators=[], prefix_operators=[], qualifier=KafkaUtils, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=partitions, selectors=[MethodInvocation(arguments=[], member=getId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=setProp, postfix_operators=[], prefix_operators=[], qualifier=workUnit, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=LEADER_ID, postfix_operators=[], prefix_operators=[], qualifier=KafkaSource, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPartitionPropName, postfix_operators=[], prefix_operators=[], qualifier=KafkaUtils, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=partitions, selectors=[MethodInvocation(arguments=[], member=getLeader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=setProp, postfix_operators=[], prefix_operators=[], qualifier=workUnit, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=LEADER_HOSTANDPORT, postfix_operators=[], prefix_operators=[], qualifier=KafkaSource, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPartitionPropName, postfix_operators=[], prefix_operators=[], qualifier=KafkaUtils, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=partitions, selectors=[MethodInvocation(arguments=[], member=getLeader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getHostAndPort, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=setProp, postfix_operators=[], prefix_operators=[], qualifier=workUnit, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=partitions, 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)
end[}]
END[}] | Keyword[private] Keyword[static] Keyword[void] identifier[populateMultiPartitionWorkUnit] operator[SEP] identifier[List] operator[<] identifier[KafkaPartition] operator[>] identifier[partitions] , identifier[WorkUnit] identifier[workUnit] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] operator[!] identifier[partitions] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[GobblinMetrics] operator[SEP] identifier[addCustomTagToState] operator[SEP] identifier[workUnit] , Keyword[new] identifier[Tag] operator[<] operator[>] operator[SEP] literal[String] , identifier[partitions] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getTopicName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[partitions] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] {
identifier[workUnit] operator[SEP] identifier[setProp] operator[SEP] identifier[KafkaUtils] operator[SEP] identifier[getPartitionPropName] operator[SEP] identifier[KafkaSource] operator[SEP] identifier[PARTITION_ID] , identifier[i] operator[SEP] , identifier[partitions] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[workUnit] operator[SEP] identifier[setProp] operator[SEP] identifier[KafkaUtils] operator[SEP] identifier[getPartitionPropName] operator[SEP] identifier[KafkaSource] operator[SEP] identifier[LEADER_ID] , identifier[i] operator[SEP] , identifier[partitions] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getLeader] operator[SEP] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[workUnit] operator[SEP] identifier[setProp] operator[SEP] identifier[KafkaUtils] operator[SEP] identifier[getPartitionPropName] operator[SEP] identifier[KafkaSource] operator[SEP] identifier[LEADER_HOSTANDPORT] , identifier[i] operator[SEP] , identifier[partitions] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getLeader] operator[SEP] operator[SEP] operator[SEP] identifier[getHostAndPort] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
|
public int[] get(int x, int y, int[] storage) {
if (!isInBounds(x, y))
throw new ImageAccessException("Requested pixel is out of bounds");
if (storage == null) {
storage = new int[numBands];
}
unsafe_get(x,y,storage);
return storage;
} | class class_name[name] begin[{]
method[get, return_type[type[int]], modifier[public], parameter[x, y, storage]] begin[{]
if[call[.isInBounds, parameter[member[.x], member[.y]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Requested pixel is out of bounds")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ImageAccessException, sub_type=None)), label=None)
else begin[{]
None
end[}]
if[binary_operation[member[.storage], ==, literal[null]]] begin[{]
assign[member[.storage], ArrayCreator(dimensions=[MemberReference(member=numBands, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))]
else begin[{]
None
end[}]
call[.unsafe_get, parameter[member[.x], member[.y], member[.storage]]]
return[member[.storage]]
end[}]
END[}] | Keyword[public] Keyword[int] operator[SEP] operator[SEP] identifier[get] operator[SEP] Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[int] operator[SEP] operator[SEP] identifier[storage] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[isInBounds] operator[SEP] identifier[x] , identifier[y] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ImageAccessException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[storage] operator[==] Other[null] operator[SEP] {
identifier[storage] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[numBands] operator[SEP] operator[SEP]
}
identifier[unsafe_get] operator[SEP] identifier[x] , identifier[y] , identifier[storage] operator[SEP] operator[SEP] Keyword[return] identifier[storage] operator[SEP]
}
|
@SuppressWarnings("unchecked")
@Override
protected void ready() throws CoreException {
// FIXME fix leaks
this.data = (D) key().optionalData()
.stream()
.filter(d -> d instanceof BehaviorData)
.findFirst()
.get();
this.component = (C) key().optionalData()
.stream()
.filter(d -> d instanceof BehavioredComponent<?>)
.findFirst()
.get();
initBehavior();
} | class class_name[name] begin[{]
method[ready, return_type[void], modifier[protected], parameter[]] begin[{]
assign[THIS[member[None.data]], Cast(expression=MethodInvocation(arguments=[], member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=optionalData, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=stream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[LambdaExpression(body=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=BehaviorData, sub_type=None), operator=instanceof), parameters=[MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=filter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=findFirst, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=D, sub_type=None))]
assign[THIS[member[None.component]], Cast(expression=MethodInvocation(arguments=[], member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=optionalData, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=stream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[LambdaExpression(body=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=BehavioredComponent, sub_type=None), operator=instanceof), parameters=[MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=filter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=findFirst, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=C, sub_type=None))]
call[.initBehavior, parameter[]]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[ready] operator[SEP] operator[SEP] Keyword[throws] identifier[CoreException] {
Keyword[this] operator[SEP] identifier[data] operator[=] operator[SEP] identifier[D] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] identifier[optionalData] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[d] operator[->] identifier[d] Keyword[instanceof] identifier[BehaviorData] operator[SEP] operator[SEP] identifier[findFirst] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[component] operator[=] operator[SEP] identifier[C] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] identifier[optionalData] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[d] operator[->] identifier[d] Keyword[instanceof] identifier[BehavioredComponent] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[findFirst] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[initBehavior] operator[SEP] operator[SEP] operator[SEP]
}
|
public void writeWindowFrame(int windowSize) throws IOException {
ByteArrayOutputStream output = new ByteArrayOutputStream();
output.write(PROTOCOL_VERSION.getBytes(UTF_8));//Protocol version
output.write(WINDOW_SIZE_FRAME_TYPE.getBytes(UTF_8)); //Frame type 'W'
output.write(ByteBuffer.allocate(4).putInt(windowSize).array());//32-bit window size
lastUsedTime = System.currentTimeMillis();
out.write(output.toByteArray());
out.flush();
} | class class_name[name] begin[{]
method[writeWindowFrame, return_type[void], modifier[public], parameter[windowSize]] begin[{]
local_variable[type[ByteArrayOutputStream], output]
call[output.write, parameter[call[PROTOCOL_VERSION.getBytes, parameter[member[.UTF_8]]]]]
call[output.write, parameter[call[WINDOW_SIZE_FRAME_TYPE.getBytes, parameter[member[.UTF_8]]]]]
call[output.write, parameter[call[ByteBuffer.allocate, parameter[literal[4]]]]]
assign[member[.lastUsedTime], call[System.currentTimeMillis, parameter[]]]
call[out.write, parameter[call[output.toByteArray, parameter[]]]]
call[out.flush, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[writeWindowFrame] operator[SEP] Keyword[int] identifier[windowSize] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[ByteArrayOutputStream] identifier[output] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[write] operator[SEP] identifier[PROTOCOL_VERSION] operator[SEP] identifier[getBytes] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[write] operator[SEP] identifier[WINDOW_SIZE_FRAME_TYPE] operator[SEP] identifier[getBytes] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[write] operator[SEP] identifier[ByteBuffer] operator[SEP] identifier[allocate] operator[SEP] Other[4] operator[SEP] operator[SEP] identifier[putInt] operator[SEP] identifier[windowSize] operator[SEP] operator[SEP] identifier[array] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[lastUsedTime] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[output] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP]
}
|
public void initAllLoadedPlugins() throws PluginException {
LOGGER.debug("Initializig all loaded plugins");
for (Class<? extends Plugin> pluginClass : implementations.keySet()) {
Set<PluginContext> set = implementations.get(pluginClass);
for (PluginContext pluginContext : set) {
try {
pluginContext.initialize(pluginContext.getSystemSettings());
} catch (Throwable e) {
LOGGER.error("", e);
pluginContext.setEnabled(false, false);
}
}
}
} | class class_name[name] begin[{]
method[initAllLoadedPlugins, return_type[void], modifier[public], parameter[]] begin[{]
call[LOGGER.debug, parameter[literal["Initializig all loaded plugins"]]]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=pluginClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=implementations, selectors=[], type_arguments=None), name=set)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=PluginContext, sub_type=None))], dimensions=[], name=Set, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSystemSettings, postfix_operators=[], prefix_operators=[], qualifier=pluginContext, selectors=[], type_arguments=None)], member=initialize, postfix_operators=[], prefix_operators=[], qualifier=pluginContext, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setEnabled, postfix_operators=[], prefix_operators=[], qualifier=pluginContext, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pluginContext)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PluginContext, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=implementations, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pluginClass)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=Plugin, sub_type=None))], dimensions=[], name=Class, sub_type=None))), label=None)
end[}]
END[}] | Keyword[public] Keyword[void] identifier[initAllLoadedPlugins] operator[SEP] operator[SEP] Keyword[throws] identifier[PluginException] {
identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Plugin] operator[>] identifier[pluginClass] operator[:] identifier[implementations] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] {
identifier[Set] operator[<] identifier[PluginContext] operator[>] identifier[set] operator[=] identifier[implementations] operator[SEP] identifier[get] operator[SEP] identifier[pluginClass] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[PluginContext] identifier[pluginContext] operator[:] identifier[set] operator[SEP] {
Keyword[try] {
identifier[pluginContext] operator[SEP] identifier[initialize] operator[SEP] identifier[pluginContext] operator[SEP] identifier[getSystemSettings] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] {
identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] identifier[pluginContext] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP]
}
}
}
}
|
@Override
protected void write(JsonGenerator g, JacksonJrsTreeCodec codec) throws IOException
{
g.writeStartArray();
for (int i = 0, end = _values.size(); i < end; ++i) {
codec.writeTree(g, _values.get(i));
}
g.writeEndArray();
} | class class_name[name] begin[{]
method[write, return_type[void], modifier[protected], parameter[g, codec]] begin[{]
call[g.writeStartArray, parameter[]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=_values, selectors=[], type_arguments=None)], member=writeTree, postfix_operators=[], prefix_operators=[], qualifier=codec, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i), VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=_values, selectors=[], type_arguments=None), name=end)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None)
call[g.writeEndArray, parameter[]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[write] operator[SEP] identifier[JsonGenerator] identifier[g] , identifier[JacksonJrsTreeCodec] identifier[codec] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[g] operator[SEP] identifier[writeStartArray] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[end] operator[=] identifier[_values] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[end] operator[SEP] operator[++] identifier[i] operator[SEP] {
identifier[codec] operator[SEP] identifier[writeTree] operator[SEP] identifier[g] , identifier[_values] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP]
}
identifier[g] operator[SEP] identifier[writeEndArray] operator[SEP] operator[SEP] operator[SEP]
}
|
public ApiResponse<ApiSuccessResponse> saveEmailWithHttpInfo(String id, SaveData saveData) throws ApiException {
com.squareup.okhttp.Call call = saveEmailValidateBeforeCall(id, saveData, null, null);
Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType();
return apiClient.execute(call, localVarReturnType);
} | class class_name[name] begin[{]
method[saveEmailWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[id, saveData]] begin[{]
local_variable[type[com], call]
local_variable[type[Type], localVarReturnType]
return[call[apiClient.execute, parameter[member[.call], member[.localVarReturnType]]]]
end[}]
END[}] | Keyword[public] identifier[ApiResponse] operator[<] identifier[ApiSuccessResponse] operator[>] identifier[saveEmailWithHttpInfo] operator[SEP] identifier[String] identifier[id] , identifier[SaveData] identifier[saveData] operator[SEP] Keyword[throws] identifier[ApiException] {
identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[saveEmailValidateBeforeCall] operator[SEP] identifier[id] , identifier[saveData] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[Type] identifier[localVarReturnType] operator[=] Keyword[new] identifier[TypeToken] operator[<] identifier[ApiSuccessResponse] operator[>] operator[SEP] operator[SEP] {
} operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[apiClient] operator[SEP] identifier[execute] operator[SEP] identifier[call] , identifier[localVarReturnType] operator[SEP] operator[SEP]
}
|
public void generateClass(TreeLogger logger, GeneratorContext context, List<JClassType> subclasses) {
PrintWriter printWriter = context.tryCreate(logger, PACKAGE_NAME, CLASS_NAME);
if (printWriter == null) {
return;
}
ClassSourceFileComposerFactory composer = new ClassSourceFileComposerFactory(PACKAGE_NAME, CLASS_NAME);
composer.addImplementedInterface(INIT_INTERFACE_NAME);
SourceWriter sourceWriter = composer.createSourceWriter(context, printWriter);
sourceWriter.println("public java.util.Map<String, " + COMMAND_INTERFACE + "> initCommands() {");
sourceWriter.indent();
sourceWriter.println(
"java.util.Map<String, "
+ COMMAND_INTERFACE
+ "> result=new java.util.HashMap<String, "
+ COMMAND_INTERFACE
+ ">();");
for (JClassType type : subclasses) {
sourceWriter.println(
"result.put(\""
+ type.getQualifiedSourceName()
+ "\","
+ type.getQualifiedSourceName()
+ "."
+ GET_COMMAND_METHOD
+ "());");
}
sourceWriter.println("return result;");
sourceWriter.outdent();
sourceWriter.println("}");
sourceWriter.outdent();
sourceWriter.println("}");
context.commit(logger, printWriter);
} | class class_name[name] begin[{]
method[generateClass, return_type[void], modifier[public], parameter[logger, context, subclasses]] begin[{]
local_variable[type[PrintWriter], printWriter]
if[binary_operation[member[.printWriter], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[ClassSourceFileComposerFactory], composer]
call[composer.addImplementedInterface, parameter[member[.INIT_INTERFACE_NAME]]]
local_variable[type[SourceWriter], sourceWriter]
call[sourceWriter.println, parameter[binary_operation[binary_operation[literal["public java.util.Map<String, "], +, member[.COMMAND_INTERFACE]], +, literal["> initCommands() {"]]]]
call[sourceWriter.indent, parameter[]]
call[sourceWriter.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["java.util.Map<String, "], +, member[.COMMAND_INTERFACE]], +, literal["> result=new java.util.HashMap<String, "]], +, member[.COMMAND_INTERFACE]], +, literal[">();"]]]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="result.put(\""), operandr=MethodInvocation(arguments=[], member=getQualifiedSourceName, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\","), operator=+), operandr=MethodInvocation(arguments=[], member=getQualifiedSourceName, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=GET_COMMAND_METHOD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="());"), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=sourceWriter, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=subclasses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=type)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JClassType, sub_type=None))), label=None)
call[sourceWriter.println, parameter[literal["return result;"]]]
call[sourceWriter.outdent, parameter[]]
call[sourceWriter.println, parameter[literal["}"]]]
call[sourceWriter.outdent, parameter[]]
call[sourceWriter.println, parameter[literal["}"]]]
call[context.commit, parameter[member[.logger], member[.printWriter]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[generateClass] operator[SEP] identifier[TreeLogger] identifier[logger] , identifier[GeneratorContext] identifier[context] , identifier[List] operator[<] identifier[JClassType] operator[>] identifier[subclasses] operator[SEP] {
identifier[PrintWriter] identifier[printWriter] operator[=] identifier[context] operator[SEP] identifier[tryCreate] operator[SEP] identifier[logger] , identifier[PACKAGE_NAME] , identifier[CLASS_NAME] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[printWriter] operator[==] Other[null] operator[SEP] {
Keyword[return] operator[SEP]
}
identifier[ClassSourceFileComposerFactory] identifier[composer] operator[=] Keyword[new] identifier[ClassSourceFileComposerFactory] operator[SEP] identifier[PACKAGE_NAME] , identifier[CLASS_NAME] operator[SEP] operator[SEP] identifier[composer] operator[SEP] identifier[addImplementedInterface] operator[SEP] identifier[INIT_INTERFACE_NAME] operator[SEP] operator[SEP] identifier[SourceWriter] identifier[sourceWriter] operator[=] identifier[composer] operator[SEP] identifier[createSourceWriter] operator[SEP] identifier[context] , identifier[printWriter] operator[SEP] operator[SEP] identifier[sourceWriter] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[COMMAND_INTERFACE] operator[+] literal[String] operator[SEP] operator[SEP] identifier[sourceWriter] operator[SEP] identifier[indent] operator[SEP] operator[SEP] operator[SEP] identifier[sourceWriter] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[COMMAND_INTERFACE] operator[+] literal[String] operator[+] identifier[COMMAND_INTERFACE] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[JClassType] identifier[type] operator[:] identifier[subclasses] operator[SEP] {
identifier[sourceWriter] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[type] operator[SEP] identifier[getQualifiedSourceName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[type] operator[SEP] identifier[getQualifiedSourceName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[GET_COMMAND_METHOD] operator[+] literal[String] operator[SEP] operator[SEP]
}
identifier[sourceWriter] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sourceWriter] operator[SEP] identifier[outdent] operator[SEP] operator[SEP] operator[SEP] identifier[sourceWriter] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sourceWriter] operator[SEP] identifier[outdent] operator[SEP] operator[SEP] operator[SEP] identifier[sourceWriter] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[commit] operator[SEP] identifier[logger] , identifier[printWriter] operator[SEP] operator[SEP]
}
|
static Object convert(Object object, Class<?> otherType) {
if (otherType == Date.class) {
if (object instanceof Calendar) {
return ((Calendar) object).getTime();
}
if (object instanceof XMLGregorianCalendar) {
return ((XMLGregorianCalendar) object).toGregorianCalendar().getTime();
}
} else if (otherType == BigDecimal.class) {
if (object instanceof BigInteger) {
return new BigDecimal((BigInteger) object);
} else if (object instanceof Number) {
return BigDecimal.valueOf(((Number) object).doubleValue());
}
} else if (otherType == BigInteger.class) {
if (!(object instanceof BigDecimal) && (object instanceof Number)) {
return BigInteger.valueOf(((Number) object).longValue());
}
}
return object;
} | class class_name[name] begin[{]
method[convert, return_type[type[Object]], modifier[static], parameter[object, otherType]] begin[{]
if[binary_operation[member[.otherType], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))]] begin[{]
if[binary_operation[member[.object], instanceof, type[Calendar]]] begin[{]
return[Cast(expression=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Calendar, sub_type=None))]
else begin[{]
None
end[}]
if[binary_operation[member[.object], instanceof, type[XMLGregorianCalendar]]] begin[{]
return[Cast(expression=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=XMLGregorianCalendar, sub_type=None))]
else begin[{]
None
end[}]
else begin[{]
if[binary_operation[member[.otherType], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigDecimal, sub_type=None))]] begin[{]
if[binary_operation[member[.object], instanceof, type[BigInteger]]] begin[{]
return[ClassCreator(arguments=[Cast(expression=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BigInteger, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigDecimal, sub_type=None))]
else begin[{]
if[binary_operation[member[.object], instanceof, type[Number]]] begin[{]
return[call[BigDecimal.valueOf, parameter[Cast(expression=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None))]]]
else begin[{]
None
end[}]
end[}]
else begin[{]
if[binary_operation[member[.otherType], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigInteger, sub_type=None))]] begin[{]
if[binary_operation[binary_operation[member[.object], instanceof, type[BigDecimal]], &&, binary_operation[member[.object], instanceof, type[Number]]]] begin[{]
return[call[BigInteger.valueOf, parameter[Cast(expression=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None))]]]
else begin[{]
None
end[}]
else begin[{]
None
end[}]
end[}]
end[}]
return[member[.object]]
end[}]
END[}] | Keyword[static] identifier[Object] identifier[convert] operator[SEP] identifier[Object] identifier[object] , identifier[Class] operator[<] operator[?] operator[>] identifier[otherType] operator[SEP] {
Keyword[if] operator[SEP] identifier[otherType] operator[==] identifier[Date] operator[SEP] Keyword[class] operator[SEP] {
Keyword[if] operator[SEP] identifier[object] Keyword[instanceof] identifier[Calendar] operator[SEP] {
Keyword[return] operator[SEP] operator[SEP] identifier[Calendar] operator[SEP] identifier[object] operator[SEP] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[object] Keyword[instanceof] identifier[XMLGregorianCalendar] operator[SEP] {
Keyword[return] operator[SEP] operator[SEP] identifier[XMLGregorianCalendar] operator[SEP] identifier[object] operator[SEP] operator[SEP] identifier[toGregorianCalendar] operator[SEP] operator[SEP] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[else] Keyword[if] operator[SEP] identifier[otherType] operator[==] identifier[BigDecimal] operator[SEP] Keyword[class] operator[SEP] {
Keyword[if] operator[SEP] identifier[object] Keyword[instanceof] identifier[BigInteger] operator[SEP] {
Keyword[return] Keyword[new] identifier[BigDecimal] operator[SEP] operator[SEP] identifier[BigInteger] operator[SEP] identifier[object] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[object] Keyword[instanceof] identifier[Number] operator[SEP] {
Keyword[return] identifier[BigDecimal] operator[SEP] identifier[valueOf] operator[SEP] operator[SEP] operator[SEP] identifier[Number] operator[SEP] identifier[object] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[else] Keyword[if] operator[SEP] identifier[otherType] operator[==] identifier[BigInteger] operator[SEP] Keyword[class] operator[SEP] {
Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[object] Keyword[instanceof] identifier[BigDecimal] operator[SEP] operator[&&] operator[SEP] identifier[object] Keyword[instanceof] identifier[Number] operator[SEP] operator[SEP] {
Keyword[return] identifier[BigInteger] operator[SEP] identifier[valueOf] operator[SEP] operator[SEP] operator[SEP] identifier[Number] operator[SEP] identifier[object] operator[SEP] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[return] identifier[object] operator[SEP]
}
|
@Deprecated
public void fit(INDArray data, int nDims) {
this.x = data;
this.numDimensions = nDims;
fit();
} | class class_name[name] begin[{]
method[fit, return_type[void], modifier[public], parameter[data, nDims]] begin[{]
assign[THIS[member[None.x]], member[.data]]
assign[THIS[member[None.numDimensions]], member[.nDims]]
call[.fit, parameter[]]
end[}]
END[}] | annotation[@] identifier[Deprecated] Keyword[public] Keyword[void] identifier[fit] operator[SEP] identifier[INDArray] identifier[data] , Keyword[int] identifier[nDims] operator[SEP] {
Keyword[this] operator[SEP] identifier[x] operator[=] identifier[data] operator[SEP] Keyword[this] operator[SEP] identifier[numDimensions] operator[=] identifier[nDims] operator[SEP] identifier[fit] operator[SEP] operator[SEP] operator[SEP]
}
|
@Override
@FFDCIgnore(InterruptedException.class)
/* re-thrown as an IllegalStateException and FFDC'd later */
public ThreadContextClassLoader createThreadContextClassLoader(final ClassLoader applicationClassLoader) {
final String methodName = "createThreadContextClassLoader(): ";
if (applicationClassLoader == null) {
throw new IllegalArgumentException("ClassLoader argument is null");
}
final String key;
if (applicationClassLoader instanceof AppClassLoader) {
key = ((AppClassLoader) applicationClassLoader).getKey().toString();
if (tc.isDebugEnabled())
Tr.debug(tc, methodName + "Instance of LibertyClassLoader, key = " + key);
} else if (applicationClassLoader instanceof BundleReference) {
key = Long.toString(((BundleReference) applicationClassLoader).getBundle().getBundleId());
if (tc.isDebugEnabled())
Tr.debug(tc, methodName + "Instance of BundleReference, key = " + key);
} else {
throw new IllegalArgumentException(applicationClassLoader.toString() + " + is an unexpected ClassLoader type");
}
ThreadContextClassLoader result;
try {
if (tcclStoreLock.tryLock(TCCL_LOCK_WAIT, TimeUnit.MILLISECONDS)) {
do {
result = this.tcclStore.retrieveOrCreate(key, new Factory<ThreadContextClassLoader>() {
@Override
public ThreadContextClassLoader createInstance() {
return ClassLoadingServiceImpl.this.createTCCL(applicationClassLoader, key);
}
}); // using an anonymous inner class here for clarity - the object should be GCable as soon as the method call returns
if (!!!result.isFor(applicationClassLoader)) {
// this is a stale entry for a previous ClassLoader that had the same key
this.tcclStore.remove(result);
result = null;
}
} while (result == null);
result.incrementRefCount();
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
leakDetectionMap.put(result, Thread.currentThread().getStackTrace());
}
} else {
// could not acquire the tcclStoreLock
throw new IllegalStateException("Unable to acquire TCCL store lock");
}
} catch (InterruptedException e) {
throw new IllegalStateException("Thread interrupted while acquiring TCCL store lock");
} finally {
if (tcclStoreLock.isHeldByCurrentThread()) {
tcclStoreLock.unlock();
}
}
return result;
} | class class_name[name] begin[{]
method[createThreadContextClassLoader, return_type[type[ThreadContextClassLoader]], modifier[public], parameter[applicationClassLoader]] begin[{]
local_variable[type[String], methodName]
if[binary_operation[member[.applicationClassLoader], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ClassLoader argument is null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)
else begin[{]
None
end[}]
local_variable[type[String], key]
if[binary_operation[member[.applicationClassLoader], instanceof, type[AppClassLoader]]] begin[{]
assign[member[.key], Cast(expression=MemberReference(member=applicationClassLoader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AppClassLoader, sub_type=None))]
if[call[tc.isDebugEnabled, parameter[]]] begin[{]
call[Tr.debug, parameter[member[.tc], binary_operation[binary_operation[member[.methodName], +, literal["Instance of LibertyClassLoader, key = "]], +, member[.key]]]]
else begin[{]
None
end[}]
else begin[{]
if[binary_operation[member[.applicationClassLoader], instanceof, type[BundleReference]]] begin[{]
assign[member[.key], call[Long.toString, parameter[Cast(expression=MemberReference(member=applicationClassLoader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BundleReference, sub_type=None))]]]
if[call[tc.isDebugEnabled, parameter[]]] begin[{]
call[Tr.debug, parameter[member[.tc], binary_operation[binary_operation[member[.methodName], +, literal["Instance of BundleReference, key = "]], +, member[.key]]]]
else begin[{]
None
end[}]
else begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=applicationClassLoader, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" + is an unexpected ClassLoader type"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)
end[}]
end[}]
local_variable[type[ThreadContextClassLoader], result]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=TCCL_LOCK_WAIT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=MILLISECONDS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])], member=tryLock, postfix_operators=[], prefix_operators=[], qualifier=tcclStoreLock, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to acquire TCCL store lock")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[DoStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=tcclStore, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=This(postfix_operators=[], prefix_operators=[], qualifier=ClassLoadingServiceImpl, selectors=[MethodInvocation(arguments=[MemberReference(member=applicationClassLoader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createTCCL, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], documentation=None, modifiers={'public'}, name=createInstance, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=ThreadContextClassLoader, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ThreadContextClassLoader, sub_type=None))], dimensions=None, name=Factory, sub_type=None))], member=retrieveOrCreate, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=applicationClassLoader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isFor, postfix_operators=[], prefix_operators=['!', '!', '!'], qualifier=result, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=tcclStore, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)]))]), condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=incrementRefCount, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[MethodInvocation(arguments=[], member=getStackTrace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=leakDetectionMap, selectors=[], type_arguments=None), label=None)]))]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Thread interrupted while acquiring TCCL store lock")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException']))], finally_block=[IfStatement(condition=MethodInvocation(arguments=[], member=isHeldByCurrentThread, postfix_operators=[], prefix_operators=[], qualifier=tcclStoreLock, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=tcclStoreLock, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None)
return[member[.result]]
end[}]
END[}] | annotation[@] identifier[Override] annotation[@] identifier[FFDCIgnore] operator[SEP] identifier[InterruptedException] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[ThreadContextClassLoader] identifier[createThreadContextClassLoader] operator[SEP] Keyword[final] identifier[ClassLoader] identifier[applicationClassLoader] operator[SEP] {
Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[applicationClassLoader] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[final] identifier[String] identifier[key] operator[SEP] Keyword[if] operator[SEP] identifier[applicationClassLoader] Keyword[instanceof] identifier[AppClassLoader] operator[SEP] {
identifier[key] operator[=] operator[SEP] operator[SEP] identifier[AppClassLoader] operator[SEP] identifier[applicationClassLoader] operator[SEP] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[methodName] operator[+] literal[String] operator[+] identifier[key] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[applicationClassLoader] Keyword[instanceof] identifier[BundleReference] operator[SEP] {
identifier[key] operator[=] identifier[Long] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[BundleReference] operator[SEP] identifier[applicationClassLoader] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] operator[SEP] operator[SEP] identifier[getBundleId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[methodName] operator[+] literal[String] operator[+] identifier[key] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[applicationClassLoader] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP]
}
identifier[ThreadContextClassLoader] identifier[result] operator[SEP] Keyword[try] {
Keyword[if] operator[SEP] identifier[tcclStoreLock] operator[SEP] identifier[tryLock] operator[SEP] identifier[TCCL_LOCK_WAIT] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] operator[SEP] {
Keyword[do] {
identifier[result] operator[=] Keyword[this] operator[SEP] identifier[tcclStore] operator[SEP] identifier[retrieveOrCreate] operator[SEP] identifier[key] , Keyword[new] identifier[Factory] operator[<] identifier[ThreadContextClassLoader] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] identifier[ThreadContextClassLoader] identifier[createInstance] operator[SEP] operator[SEP] {
Keyword[return] identifier[ClassLoadingServiceImpl] operator[SEP] Keyword[this] operator[SEP] identifier[createTCCL] operator[SEP] identifier[applicationClassLoader] , identifier[key] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[!] operator[!] identifier[result] operator[SEP] identifier[isFor] operator[SEP] identifier[applicationClassLoader] operator[SEP] operator[SEP] {
Keyword[this] operator[SEP] identifier[tcclStore] operator[SEP] identifier[remove] operator[SEP] identifier[result] operator[SEP] operator[SEP] identifier[result] operator[=] Other[null] operator[SEP]
}
}
Keyword[while] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[incrementRefCount] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[leakDetectionMap] operator[SEP] identifier[put] operator[SEP] identifier[result] , identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getStackTrace] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[else] {
Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
}
Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[finally] {
Keyword[if] operator[SEP] identifier[tcclStoreLock] operator[SEP] identifier[isHeldByCurrentThread] operator[SEP] operator[SEP] operator[SEP] {
identifier[tcclStoreLock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[return] identifier[result] operator[SEP]
}
|
private static void addVisitorAttributeMethod(ClassWriter classWriter, XsdAttribute attribute) {
MethodVisitor mVisitor = classWriter.visitMethod(ACC_PUBLIC, VISIT_ATTRIBUTE_NAME + getCleanName(attribute.getName()), "(" + JAVA_STRING_DESC + ")V", null, null);
mVisitor.visitLocalVariable(firstToLower(getCleanName(attribute.getName())), JAVA_STRING_DESC, null, new Label(), new Label(),1);
mVisitor.visitCode();
mVisitor.visitVarInsn(ALOAD, 0);
mVisitor.visitLdcInsn(attribute.getRawName());
mVisitor.visitVarInsn(ALOAD, 1);
mVisitor.visitMethodInsn(INVOKEVIRTUAL, elementVisitorType, VISIT_ATTRIBUTE_NAME, "(" + JAVA_STRING_DESC + JAVA_STRING_DESC + ")V", false);
mVisitor.visitInsn(RETURN);
mVisitor.visitMaxs(3, 2);
mVisitor.visitEnd();
} | class class_name[name] begin[{]
method[addVisitorAttributeMethod, return_type[void], modifier[private static], parameter[classWriter, attribute]] begin[{]
local_variable[type[MethodVisitor], mVisitor]
call[mVisitor.visitLocalVariable, parameter[call[.firstToLower, parameter[call[.getCleanName, parameter[call[attribute.getName, parameter[]]]]]], member[.JAVA_STRING_DESC], literal[null], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Label, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Label, sub_type=None)), literal[1]]]
call[mVisitor.visitCode, parameter[]]
call[mVisitor.visitVarInsn, parameter[member[.ALOAD], literal[0]]]
call[mVisitor.visitLdcInsn, parameter[call[attribute.getRawName, parameter[]]]]
call[mVisitor.visitVarInsn, parameter[member[.ALOAD], literal[1]]]
call[mVisitor.visitMethodInsn, parameter[member[.INVOKEVIRTUAL], member[.elementVisitorType], member[.VISIT_ATTRIBUTE_NAME], binary_operation[binary_operation[binary_operation[literal["("], +, member[.JAVA_STRING_DESC]], +, member[.JAVA_STRING_DESC]], +, literal[")V"]], literal[false]]]
call[mVisitor.visitInsn, parameter[member[.RETURN]]]
call[mVisitor.visitMaxs, parameter[literal[3], literal[2]]]
call[mVisitor.visitEnd, parameter[]]
end[}]
END[}] | Keyword[private] Keyword[static] Keyword[void] identifier[addVisitorAttributeMethod] operator[SEP] identifier[ClassWriter] identifier[classWriter] , identifier[XsdAttribute] identifier[attribute] operator[SEP] {
identifier[MethodVisitor] identifier[mVisitor] operator[=] identifier[classWriter] operator[SEP] identifier[visitMethod] operator[SEP] identifier[ACC_PUBLIC] , identifier[VISIT_ATTRIBUTE_NAME] operator[+] identifier[getCleanName] operator[SEP] identifier[attribute] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] , literal[String] operator[+] identifier[JAVA_STRING_DESC] operator[+] literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[mVisitor] operator[SEP] identifier[visitLocalVariable] operator[SEP] identifier[firstToLower] operator[SEP] identifier[getCleanName] operator[SEP] identifier[attribute] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] , identifier[JAVA_STRING_DESC] , Other[null] , Keyword[new] identifier[Label] operator[SEP] operator[SEP] , Keyword[new] identifier[Label] operator[SEP] operator[SEP] , Other[1] operator[SEP] operator[SEP] identifier[mVisitor] operator[SEP] identifier[visitCode] operator[SEP] operator[SEP] operator[SEP] identifier[mVisitor] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mVisitor] operator[SEP] identifier[visitLdcInsn] operator[SEP] identifier[attribute] operator[SEP] identifier[getRawName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[mVisitor] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[1] operator[SEP] operator[SEP] identifier[mVisitor] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKEVIRTUAL] , identifier[elementVisitorType] , identifier[VISIT_ATTRIBUTE_NAME] , literal[String] operator[+] identifier[JAVA_STRING_DESC] operator[+] identifier[JAVA_STRING_DESC] operator[+] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[mVisitor] operator[SEP] identifier[visitInsn] operator[SEP] identifier[RETURN] operator[SEP] operator[SEP] identifier[mVisitor] operator[SEP] identifier[visitMaxs] operator[SEP] Other[3] , Other[2] operator[SEP] operator[SEP] identifier[mVisitor] operator[SEP] identifier[visitEnd] operator[SEP] operator[SEP] operator[SEP]
}
|
public Repositories getRepositories() {
JSONRestClient.Response response = jsonRestClient.doGet();
if (!response.isOK()) {
throw new RuntimeException(JdbcI18n.invalidServerResponse.text(jsonRestClient.url(), response.asString()));
}
return new Repositories(response.json());
} | class class_name[name] begin[{]
method[getRepositories, return_type[type[Repositories]], modifier[public], parameter[]] begin[{]
local_variable[type[JSONRestClient], response]
if[call[response.isOK, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=url, postfix_operators=[], prefix_operators=[], qualifier=jsonRestClient, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=asString, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None)], member=text, postfix_operators=[], prefix_operators=[], qualifier=JdbcI18n.invalidServerResponse, 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[}]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=json, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Repositories, sub_type=None))]
end[}]
END[}] | Keyword[public] identifier[Repositories] identifier[getRepositories] operator[SEP] operator[SEP] {
identifier[JSONRestClient] operator[SEP] identifier[Response] identifier[response] operator[=] identifier[jsonRestClient] operator[SEP] identifier[doGet] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[response] operator[SEP] identifier[isOK] operator[SEP] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[JdbcI18n] operator[SEP] identifier[invalidServerResponse] operator[SEP] identifier[text] operator[SEP] identifier[jsonRestClient] operator[SEP] identifier[url] operator[SEP] operator[SEP] , identifier[response] operator[SEP] identifier[asString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] Keyword[new] identifier[Repositories] operator[SEP] identifier[response] operator[SEP] identifier[json] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
|
public final String getState() {
String thisMethodName = "getState";
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(tc, thisMethodName, this);
SibTr.exit(tc, thisMethodName, states[_state]);
}
return states[_state];
} | class class_name[name] begin[{]
method[getState, return_type[type[String]], modifier[final public], parameter[]] begin[{]
local_variable[type[String], thisMethodName]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member[.tc], member[.thisMethodName], THIS[]]]
call[SibTr.exit, parameter[member[.tc], member[.thisMethodName], member[.states]]]
else begin[{]
None
end[}]
return[member[.states]]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[String] identifier[getState] operator[SEP] operator[SEP] {
identifier[String] identifier[thisMethodName] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , identifier[thisMethodName] , Keyword[this] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , identifier[thisMethodName] , identifier[states] operator[SEP] identifier[_state] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] identifier[states] operator[SEP] identifier[_state] operator[SEP] operator[SEP]
}
|
public static ExecutionResult success(String message) {
ExecutionResult executionResult = new ExecutionResult();
executionResult.withSuccessMessages(message);
return executionResult;
} | class class_name[name] begin[{]
method[success, return_type[type[ExecutionResult]], modifier[public static], parameter[message]] begin[{]
local_variable[type[ExecutionResult], executionResult]
call[executionResult.withSuccessMessages, parameter[member[.message]]]
return[member[.executionResult]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[ExecutionResult] identifier[success] operator[SEP] identifier[String] identifier[message] operator[SEP] {
identifier[ExecutionResult] identifier[executionResult] operator[=] Keyword[new] identifier[ExecutionResult] operator[SEP] operator[SEP] operator[SEP] identifier[executionResult] operator[SEP] identifier[withSuccessMessages] operator[SEP] identifier[message] operator[SEP] operator[SEP] Keyword[return] identifier[executionResult] operator[SEP]
}
|
@Override
public void sawOpcode(int seen) {
ImmutabilityType seenImmutable = null;
try {
stack.precomputation(this);
switch (seen) {
case Const.INVOKESTATIC: {
String className = getClassConstantOperand();
String methodName = getNameConstantOperand();
if (IMMUTABLE_PRODUCING_METHODS.contains(className + '.' + methodName)) {
seenImmutable = ImmutabilityType.IMMUTABLE;
break;
}
}
//$FALL-THROUGH$
case Const.INVOKEINTERFACE:
case Const.INVOKESPECIAL:
case Const.INVOKEVIRTUAL: {
String className = getClassConstantOperand();
String methodName = getNameConstantOperand();
String signature = getSigConstantOperand();
MethodInfo mi = Statistics.getStatistics().getMethodStatistics(className, methodName, signature);
seenImmutable = mi.getImmutabilityType();
if (seenImmutable == ImmutabilityType.UNKNOWN) {
seenImmutable = null;
}
}
break;
case Const.ARETURN: {
processARreturn();
break;
}
default:
break;
}
} finally {
stack.sawOpcode(this, seen);
if ((seenImmutable != null) && (stack.getStackDepth() > 0)) {
OpcodeStack.Item item = stack.getStackItem(0);
item.setUserValue(seenImmutable);
}
}
} | class class_name[name] begin[{]
method[sawOpcode, return_type[void], modifier[public], parameter[seen]] begin[{]
local_variable[type[ImmutabilityType], seenImmutable]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=precomputation, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None), label=None), SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=INVOKESTATIC, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[])], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getClassConstantOperand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=className)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getNameConstantOperand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=methodName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.'), operator=+), operandr=MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=contains, postfix_operators=[], prefix_operators=[], qualifier=IMMUTABLE_PRODUCING_METHODS, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=seenImmutable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=IMMUTABLE, postfix_operators=[], prefix_operators=[], qualifier=ImmutabilityType, selectors=[])), label=None), BreakStatement(goto=None, label=None)]))])]), SwitchStatementCase(case=[MemberReference(member=INVOKEINTERFACE, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=INVOKESPECIAL, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=INVOKEVIRTUAL, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[])], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getClassConstantOperand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=className)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getNameConstantOperand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=methodName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSigConstantOperand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=signature)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getStatistics, postfix_operators=[], prefix_operators=[], qualifier=Statistics, selectors=[MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=signature, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getMethodStatistics, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=mi)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MethodInfo, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=seenImmutable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getImmutabilityType, postfix_operators=[], prefix_operators=[], qualifier=mi, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=seenImmutable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=UNKNOWN, postfix_operators=[], prefix_operators=[], qualifier=ImmutabilityType, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=seenImmutable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=ARETURN, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[])], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=processARreturn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MemberReference(member=seen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=seen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sawOpcode, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=seenImmutable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStackDepth, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), 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=0)], member=getStackItem, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None), name=item)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OpcodeStack, sub_type=ReferenceType(arguments=None, dimensions=None, name=Item, sub_type=None))), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=seenImmutable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setUserValue, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None)
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[sawOpcode] operator[SEP] Keyword[int] identifier[seen] operator[SEP] {
identifier[ImmutabilityType] identifier[seenImmutable] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[stack] operator[SEP] identifier[precomputation] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[seen] operator[SEP] {
Keyword[case] identifier[Const] operator[SEP] identifier[INVOKESTATIC] operator[:] {
identifier[String] identifier[className] operator[=] identifier[getClassConstantOperand] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[methodName] operator[=] identifier[getNameConstantOperand] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[IMMUTABLE_PRODUCING_METHODS] operator[SEP] identifier[contains] operator[SEP] identifier[className] operator[+] literal[String] operator[+] identifier[methodName] operator[SEP] operator[SEP] {
identifier[seenImmutable] operator[=] identifier[ImmutabilityType] operator[SEP] identifier[IMMUTABLE] operator[SEP] Keyword[break] operator[SEP]
}
}
Keyword[case] identifier[Const] operator[SEP] identifier[INVOKEINTERFACE] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[INVOKESPECIAL] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[INVOKEVIRTUAL] operator[:] {
identifier[String] identifier[className] operator[=] identifier[getClassConstantOperand] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[methodName] operator[=] identifier[getNameConstantOperand] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[signature] operator[=] identifier[getSigConstantOperand] operator[SEP] operator[SEP] operator[SEP] identifier[MethodInfo] identifier[mi] operator[=] identifier[Statistics] operator[SEP] identifier[getStatistics] operator[SEP] operator[SEP] operator[SEP] identifier[getMethodStatistics] operator[SEP] identifier[className] , identifier[methodName] , identifier[signature] operator[SEP] operator[SEP] identifier[seenImmutable] operator[=] identifier[mi] operator[SEP] identifier[getImmutabilityType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[seenImmutable] operator[==] identifier[ImmutabilityType] operator[SEP] identifier[UNKNOWN] operator[SEP] {
identifier[seenImmutable] operator[=] Other[null] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] identifier[Const] operator[SEP] identifier[ARETURN] operator[:] {
identifier[processARreturn] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP]
}
Keyword[default] operator[:] Keyword[break] operator[SEP]
}
}
Keyword[finally] {
identifier[stack] operator[SEP] identifier[sawOpcode] operator[SEP] Keyword[this] , identifier[seen] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[seenImmutable] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[stack] operator[SEP] identifier[getStackDepth] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] operator[SEP] {
identifier[OpcodeStack] operator[SEP] identifier[Item] identifier[item] operator[=] identifier[stack] operator[SEP] identifier[getStackItem] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[item] operator[SEP] identifier[setUserValue] operator[SEP] identifier[seenImmutable] operator[SEP] operator[SEP]
}
}
}
|
<T> boolean remove(Class<T> eventClass, Listener<T> listener) {
lock.readLock().lock();
TreeSet<ListenerReferenceHolder> set = listeners.get(eventClass);
if (set != null) {
lock.readLock().unlock();
lock.writeLock().lock();
try {
DefaultListenerWrapper wrapper = new DefaultListenerWrapper(listener);
for (ListenerReferenceHolder current : set) {
if (wrapper.equals(current.getListenerWrapper())) {
return removeListenerAndSetIfNeeded(eventClass, current, set);
}
}
return false;
} finally {
lock.writeLock().unlock();
}
}
lock.readLock().unlock();
return false;
} | class class_name[name] begin[{]
method[remove, return_type[type[boolean]], modifier[default], parameter[eventClass, listener]] begin[{]
call[lock.readLock, parameter[]]
local_variable[type[TreeSet], set]
if[binary_operation[member[.set], !=, literal[null]]] begin[{]
call[lock.readLock, parameter[]]
call[lock.writeLock, parameter[]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DefaultListenerWrapper, sub_type=None)), name=wrapper)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DefaultListenerWrapper, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getListenerWrapper, postfix_operators=[], prefix_operators=[], qualifier=current, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=wrapper, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=eventClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeListenerAndSetIfNeeded, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=current)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ListenerReferenceHolder, sub_type=None))), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=writeLock, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[MethodInvocation(arguments=[], member=unlock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, resources=None)
else begin[{]
None
end[}]
call[lock.readLock, parameter[]]
return[literal[false]]
end[}]
END[}] | operator[<] identifier[T] operator[>] Keyword[boolean] identifier[remove] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[eventClass] , identifier[Listener] operator[<] identifier[T] operator[>] identifier[listener] operator[SEP] {
identifier[lock] operator[SEP] identifier[readLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] identifier[TreeSet] operator[<] identifier[ListenerReferenceHolder] operator[>] identifier[set] operator[=] identifier[listeners] operator[SEP] identifier[get] operator[SEP] identifier[eventClass] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[set] operator[!=] Other[null] operator[SEP] {
identifier[lock] operator[SEP] identifier[readLock] operator[SEP] operator[SEP] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] identifier[writeLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[DefaultListenerWrapper] identifier[wrapper] operator[=] Keyword[new] identifier[DefaultListenerWrapper] operator[SEP] identifier[listener] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ListenerReferenceHolder] identifier[current] operator[:] identifier[set] operator[SEP] {
Keyword[if] operator[SEP] identifier[wrapper] operator[SEP] identifier[equals] operator[SEP] identifier[current] operator[SEP] identifier[getListenerWrapper] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[removeListenerAndSetIfNeeded] operator[SEP] identifier[eventClass] , identifier[current] , identifier[set] operator[SEP] operator[SEP]
}
}
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[finally] {
identifier[lock] operator[SEP] identifier[writeLock] operator[SEP] operator[SEP] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP]
}
}
identifier[lock] operator[SEP] identifier[readLock] operator[SEP] operator[SEP] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP]
}
|
public EList<Byte> getValues()
{
if (values == null)
{
values = new EDataTypeEList<Byte>(Byte.class, this, TypesPackage.JVM_BYTE_ANNOTATION_VALUE__VALUES);
}
return values;
} | class class_name[name] begin[{]
method[getValues, return_type[type[EList]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.values], ==, literal[null]]] begin[{]
assign[member[.values], ClassCreator(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Byte, sub_type=None)), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=JVM_BYTE_ANNOTATION_VALUE__VALUES, postfix_operators=[], prefix_operators=[], qualifier=TypesPackage, 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=Byte, sub_type=None))], dimensions=None, name=EDataTypeEList, sub_type=None))]
else begin[{]
None
end[}]
return[member[.values]]
end[}]
END[}] | Keyword[public] identifier[EList] operator[<] identifier[Byte] operator[>] identifier[getValues] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[values] operator[==] Other[null] operator[SEP] {
identifier[values] operator[=] Keyword[new] identifier[EDataTypeEList] operator[<] identifier[Byte] operator[>] operator[SEP] identifier[Byte] operator[SEP] Keyword[class] , Keyword[this] , identifier[TypesPackage] operator[SEP] identifier[JVM_BYTE_ANNOTATION_VALUE__VALUES] operator[SEP] operator[SEP]
}
Keyword[return] identifier[values] operator[SEP]
}
|
@Override
public PutMetricFilterResult putMetricFilter(PutMetricFilterRequest request) {
request = beforeClientExecution(request);
return executePutMetricFilter(request);
} | class class_name[name] begin[{]
method[putMetricFilter, return_type[type[PutMetricFilterResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executePutMetricFilter, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[PutMetricFilterResult] identifier[putMetricFilter] operator[SEP] identifier[PutMetricFilterRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executePutMetricFilter] operator[SEP] identifier[request] operator[SEP] operator[SEP]
}
|
@Override
public void runReport(Map<String, Object> extra) {
try
{
rows = new ArrayList<Map<String, Object>>();
Script script = groovyShell.parse(groovyScript);
script.setBinding(new Binding());
script.getBinding().setVariable("rows", rows);
script.getBinding().setVariable("columns", getColumns());
script.getBinding().setVariable("page", getPage());
script.getBinding().setVariable("pageLimit", getPageLimit());
script.getBinding().setVariable("paramConfig", getParameterConfig());
script.getBinding().setVariable("param", new HashMap<String, ParamConfig>() {{
for (ParamConfig paramConfig : getParameterConfig()) {
put(paramConfig.getId(), paramConfig);
}
}});
script.getBinding().setVariable("extra", extra);
script.run();
} catch (Exception ex)
{
ex.printStackTrace();
getErrors().add(ex.getMessage());
}
} | class class_name[name] begin[{]
method[runReport, return_type[void], modifier[public], parameter[extra]] begin[{]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=groovyScript, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=groovyShell, selectors=[], type_arguments=None), name=script)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Script, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Binding, sub_type=None))], member=setBinding, postfix_operators=[], prefix_operators=[], qualifier=script, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getBinding, postfix_operators=[], prefix_operators=[], qualifier=script, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="rows"), MemberReference(member=rows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setVariable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getBinding, postfix_operators=[], prefix_operators=[], qualifier=script, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="columns"), MethodInvocation(arguments=[], member=getColumns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setVariable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getBinding, postfix_operators=[], prefix_operators=[], qualifier=script, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="page"), MethodInvocation(arguments=[], member=getPage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setVariable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getBinding, postfix_operators=[], prefix_operators=[], qualifier=script, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="pageLimit"), MethodInvocation(arguments=[], member=getPageLimit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setVariable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getBinding, postfix_operators=[], prefix_operators=[], qualifier=script, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="paramConfig"), MethodInvocation(arguments=[], member=getParameterConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setVariable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getBinding, postfix_operators=[], prefix_operators=[], qualifier=script, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="param"), ClassCreator(arguments=[], body=[[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=paramConfig, selectors=[], type_arguments=None), MemberReference(member=paramConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getParameterConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=paramConfig)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ParamConfig, sub_type=None))), label=None)]], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ParamConfig, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))], member=setVariable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getBinding, postfix_operators=[], prefix_operators=[], qualifier=script, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="extra"), MemberReference(member=extra, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setVariable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=run, postfix_operators=[], prefix_operators=[], qualifier=script, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getErrors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None)], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None)
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[runReport] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[extra] operator[SEP] {
Keyword[try] {
identifier[rows] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Script] identifier[script] operator[=] identifier[groovyShell] operator[SEP] identifier[parse] operator[SEP] identifier[groovyScript] operator[SEP] operator[SEP] identifier[script] operator[SEP] identifier[setBinding] operator[SEP] Keyword[new] identifier[Binding] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[script] operator[SEP] identifier[getBinding] operator[SEP] operator[SEP] operator[SEP] identifier[setVariable] operator[SEP] literal[String] , identifier[rows] operator[SEP] operator[SEP] identifier[script] operator[SEP] identifier[getBinding] operator[SEP] operator[SEP] operator[SEP] identifier[setVariable] operator[SEP] literal[String] , identifier[getColumns] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[script] operator[SEP] identifier[getBinding] operator[SEP] operator[SEP] operator[SEP] identifier[setVariable] operator[SEP] literal[String] , identifier[getPage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[script] operator[SEP] identifier[getBinding] operator[SEP] operator[SEP] operator[SEP] identifier[setVariable] operator[SEP] literal[String] , identifier[getPageLimit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[script] operator[SEP] identifier[getBinding] operator[SEP] operator[SEP] operator[SEP] identifier[setVariable] operator[SEP] literal[String] , identifier[getParameterConfig] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[script] operator[SEP] identifier[getBinding] operator[SEP] operator[SEP] operator[SEP] identifier[setVariable] operator[SEP] literal[String] , Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[ParamConfig] operator[>] operator[SEP] operator[SEP] {
{
Keyword[for] operator[SEP] identifier[ParamConfig] identifier[paramConfig] operator[:] identifier[getParameterConfig] operator[SEP] operator[SEP] operator[SEP] {
identifier[put] operator[SEP] identifier[paramConfig] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[paramConfig] operator[SEP] operator[SEP]
}
}
} operator[SEP] operator[SEP] identifier[script] operator[SEP] identifier[getBinding] operator[SEP] operator[SEP] operator[SEP] identifier[setVariable] operator[SEP] literal[String] , identifier[extra] operator[SEP] operator[SEP] identifier[script] operator[SEP] identifier[run] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] {
identifier[ex] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] identifier[getErrors] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[ex] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
|
public static String substringAfter(String text, char match) {
return text.substring(text.indexOf(match)+1);
} | class class_name[name] begin[{]
method[substringAfter, return_type[type[String]], modifier[public static], parameter[text, match]] begin[{]
return[call[text.substring, parameter[binary_operation[call[text.indexOf, parameter[member[.match]]], +, literal[1]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[substringAfter] operator[SEP] identifier[String] identifier[text] , Keyword[char] identifier[match] operator[SEP] {
Keyword[return] identifier[text] operator[SEP] identifier[substring] operator[SEP] identifier[text] operator[SEP] identifier[indexOf] operator[SEP] identifier[match] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP]
}
|
@Override
public boolean addAll(@NonNull Collection<? extends E> collection) {
final int size = collection.size();
if (size > maxSize) {
collection = new ArrayList<>(collection).subList(size - maxSize, size);
}
final int overhead = size() + collection.size() - maxSize;
if (overhead > 0) {
removeRange(0, overhead);
}
return super.addAll(collection);
} | class class_name[name] begin[{]
method[addAll, return_type[type[boolean]], modifier[public], parameter[collection]] begin[{]
local_variable[type[int], size]
if[binary_operation[member[.size], >, member[.maxSize]]] begin[{]
assign[member[.collection], ClassCreator(arguments=[MemberReference(member=collection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=maxSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=subList, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))]
else begin[{]
None
end[}]
local_variable[type[int], overhead]
if[binary_operation[member[.overhead], >, literal[0]]] begin[{]
call[.removeRange, parameter[literal[0], member[.overhead]]]
else begin[{]
None
end[}]
return[SuperMethodInvocation(arguments=[MemberReference(member=collection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[addAll] operator[SEP] annotation[@] identifier[NonNull] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[E] operator[>] identifier[collection] operator[SEP] {
Keyword[final] Keyword[int] identifier[size] operator[=] identifier[collection] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[size] operator[>] identifier[maxSize] operator[SEP] {
identifier[collection] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[collection] operator[SEP] operator[SEP] identifier[subList] operator[SEP] identifier[size] operator[-] identifier[maxSize] , identifier[size] operator[SEP] operator[SEP]
}
Keyword[final] Keyword[int] identifier[overhead] operator[=] identifier[size] operator[SEP] operator[SEP] operator[+] identifier[collection] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] identifier[maxSize] operator[SEP] Keyword[if] operator[SEP] identifier[overhead] operator[>] Other[0] operator[SEP] {
identifier[removeRange] operator[SEP] Other[0] , identifier[overhead] operator[SEP] operator[SEP]
}
Keyword[return] Keyword[super] operator[SEP] identifier[addAll] operator[SEP] identifier[collection] operator[SEP] operator[SEP]
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.