code
stringlengths 63
466k
| code_sememe
stringlengths 141
3.79M
| token_type
stringlengths 274
1.23M
|
---|---|---|
public static LinearRing convert(LineString lineString,int dimension) {
return gf.createLinearRing(convertSequence(lineString.getCoordinates(),dimension));
} | class class_name[name] begin[{]
method[convert, return_type[type[LinearRing]], modifier[public static], parameter[lineString, dimension]] begin[{]
return[call[gf.createLinearRing, parameter[call[.convertSequence, parameter[call[lineString.getCoordinates, parameter[]], member[.dimension]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[LinearRing] identifier[convert] operator[SEP] identifier[LineString] identifier[lineString] , Keyword[int] identifier[dimension] operator[SEP] {
Keyword[return] identifier[gf] operator[SEP] identifier[createLinearRing] operator[SEP] identifier[convertSequence] operator[SEP] identifier[lineString] operator[SEP] identifier[getCoordinates] operator[SEP] operator[SEP] , identifier[dimension] operator[SEP] operator[SEP] operator[SEP]
}
|
public void requestBroadcast (String message)
{
message = filter(message, null, true);
if (message == null) {
displayFeedback(_bundle, MessageBundle.compose("m.broadcast_failed", "m.filtered"));
return;
}
_cservice.broadcast(message, new ChatService.InvocationListener() {
public void requestFailed (String reason) {
reason = MessageBundle.compose("m.broadcast_failed", reason);
displayFeedback(_bundle, reason);
}
});
} | class class_name[name] begin[{]
method[requestBroadcast, return_type[void], modifier[public], parameter[message]] begin[{]
assign[member[.message], call[.filter, parameter[member[.message], literal[null], literal[true]]]]
if[binary_operation[member[.message], ==, literal[null]]] begin[{]
call[.displayFeedback, parameter[member[._bundle], call[MessageBundle.compose, parameter[literal["m.broadcast_failed"], literal["m.filtered"]]]]]
return[None]
else begin[{]
None
end[}]
call[_cservice.broadcast, parameter[member[.message], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=reason, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="m.broadcast_failed"), MemberReference(member=reason, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compose, postfix_operators=[], prefix_operators=[], qualifier=MessageBundle, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=_bundle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reason, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=displayFeedback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=requestFailed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=reason, type=ReferenceType(arguments=None, dimensions=[], name=String, 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=ChatService, sub_type=ReferenceType(arguments=None, dimensions=None, name=InvocationListener, sub_type=None)))]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[requestBroadcast] operator[SEP] identifier[String] identifier[message] operator[SEP] {
identifier[message] operator[=] identifier[filter] operator[SEP] identifier[message] , Other[null] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[message] operator[==] Other[null] operator[SEP] {
identifier[displayFeedback] operator[SEP] identifier[_bundle] , identifier[MessageBundle] operator[SEP] identifier[compose] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP]
}
identifier[_cservice] operator[SEP] identifier[broadcast] operator[SEP] identifier[message] , Keyword[new] identifier[ChatService] operator[SEP] identifier[InvocationListener] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[requestFailed] operator[SEP] identifier[String] identifier[reason] operator[SEP] {
identifier[reason] operator[=] identifier[MessageBundle] operator[SEP] identifier[compose] operator[SEP] literal[String] , identifier[reason] operator[SEP] operator[SEP] identifier[displayFeedback] operator[SEP] identifier[_bundle] , identifier[reason] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP]
}
|
public static String regexFindFirst(String pattern, String str) {
return regexFindFirst(Pattern.compile(pattern), str, 1);
} | class class_name[name] begin[{]
method[regexFindFirst, return_type[type[String]], modifier[public static], parameter[pattern, str]] begin[{]
return[call[.regexFindFirst, parameter[call[Pattern.compile, parameter[member[.pattern]]], member[.str], literal[1]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[regexFindFirst] operator[SEP] identifier[String] identifier[pattern] , identifier[String] identifier[str] operator[SEP] {
Keyword[return] identifier[regexFindFirst] operator[SEP] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[pattern] operator[SEP] , identifier[str] , Other[1] operator[SEP] operator[SEP]
}
|
static public boolean isUnCaughtExceptionDetected () {
if (context == null) {
if (!context_null_msg_already_printed) {
Log.w(LOG_TAG_NAME, CONTEXT_NULL_MSG);
context_null_msg_already_printed = true;
}
return false;
}
return context.getSharedPreferences (SHARED_PREF_KEY, Context.MODE_PRIVATE).getBoolean (SHARED_PREF_KEY_CRASH_DETECTED, false);
} | class class_name[name] begin[{]
method[isUnCaughtExceptionDetected, return_type[type[boolean]], modifier[public static], parameter[]] begin[{]
if[binary_operation[member[.context], ==, literal[null]]] begin[{]
if[member[.context_null_msg_already_printed]] begin[{]
call[Log.w, parameter[member[.LOG_TAG_NAME], member[.CONTEXT_NULL_MSG]]]
assign[member[.context_null_msg_already_printed], literal[true]]
else begin[{]
None
end[}]
return[literal[false]]
else begin[{]
None
end[}]
return[call[context.getSharedPreferences, parameter[member[.SHARED_PREF_KEY], member[Context.MODE_PRIVATE]]]]
end[}]
END[}] | Keyword[static] Keyword[public] Keyword[boolean] identifier[isUnCaughtExceptionDetected] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[context] operator[==] Other[null] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[context_null_msg_already_printed] operator[SEP] {
identifier[Log] operator[SEP] identifier[w] operator[SEP] identifier[LOG_TAG_NAME] , identifier[CONTEXT_NULL_MSG] operator[SEP] operator[SEP] identifier[context_null_msg_already_printed] operator[=] literal[boolean] operator[SEP]
}
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[return] identifier[context] operator[SEP] identifier[getSharedPreferences] operator[SEP] identifier[SHARED_PREF_KEY] , identifier[Context] operator[SEP] identifier[MODE_PRIVATE] operator[SEP] operator[SEP] identifier[getBoolean] operator[SEP] identifier[SHARED_PREF_KEY_CRASH_DETECTED] , literal[boolean] operator[SEP] operator[SEP]
}
|
@Override
public Set<byte[]> keys(final byte[] pattern) {
checkIsInMultiOrPipeline();
client.keys(pattern);
return SetFromList.of(client.getBinaryMultiBulkReply());
} | class class_name[name] begin[{]
method[keys, return_type[type[Set]], modifier[public], parameter[pattern]] begin[{]
call[.checkIsInMultiOrPipeline, parameter[]]
call[client.keys, parameter[member[.pattern]]]
return[call[SetFromList.of, parameter[call[client.getBinaryMultiBulkReply, parameter[]]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Set] operator[<] Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[keys] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[pattern] operator[SEP] {
identifier[checkIsInMultiOrPipeline] operator[SEP] operator[SEP] operator[SEP] identifier[client] operator[SEP] identifier[keys] operator[SEP] identifier[pattern] operator[SEP] operator[SEP] Keyword[return] identifier[SetFromList] operator[SEP] identifier[of] operator[SEP] identifier[client] operator[SEP] identifier[getBinaryMultiBulkReply] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
|
@Override
public void query(final Query query, final Consumer<QueryResult> onSuccess, final Consumer<Throwable> onFailure) {
final Call<QueryResult> call = callQuery(query);
call.enqueue(new Callback<QueryResult>() {
@Override
public void onResponse(final Call<QueryResult> call, final Response<QueryResult> response) {
onSuccess.accept(response.body());
}
@Override
public void onFailure(final Call<QueryResult> call, final Throwable throwable) {
onFailure.accept(throwable);
}
});
} | class class_name[name] begin[{]
method[query, return_type[void], modifier[public], parameter[query, onSuccess, onFailure]] begin[{]
local_variable[type[Call], call]
call[call.enqueue, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=body, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None)], member=accept, postfix_operators=[], prefix_operators=[], qualifier=onSuccess, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onResponse, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=call, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=QueryResult, sub_type=None))], dimensions=[], name=Call, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=response, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=QueryResult, sub_type=None))], dimensions=[], name=Response, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=throwable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accept, postfix_operators=[], prefix_operators=[], qualifier=onFailure, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onFailure, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=call, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=QueryResult, sub_type=None))], dimensions=[], name=Call, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=throwable, type=ReferenceType(arguments=None, dimensions=[], name=Throwable, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=QueryResult, sub_type=None))], dimensions=None, name=Callback, sub_type=None))]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[query] operator[SEP] Keyword[final] identifier[Query] identifier[query] , Keyword[final] identifier[Consumer] operator[<] identifier[QueryResult] operator[>] identifier[onSuccess] , Keyword[final] identifier[Consumer] operator[<] identifier[Throwable] operator[>] identifier[onFailure] operator[SEP] {
Keyword[final] identifier[Call] operator[<] identifier[QueryResult] operator[>] identifier[call] operator[=] identifier[callQuery] operator[SEP] identifier[query] operator[SEP] operator[SEP] identifier[call] operator[SEP] identifier[enqueue] operator[SEP] Keyword[new] identifier[Callback] operator[<] identifier[QueryResult] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onResponse] operator[SEP] Keyword[final] identifier[Call] operator[<] identifier[QueryResult] operator[>] identifier[call] , Keyword[final] identifier[Response] operator[<] identifier[QueryResult] operator[>] identifier[response] operator[SEP] {
identifier[onSuccess] operator[SEP] identifier[accept] operator[SEP] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
} annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onFailure] operator[SEP] Keyword[final] identifier[Call] operator[<] identifier[QueryResult] operator[>] identifier[call] , Keyword[final] identifier[Throwable] identifier[throwable] operator[SEP] {
identifier[onFailure] operator[SEP] identifier[accept] operator[SEP] identifier[throwable] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP]
}
|
@SuppressWarnings("rawtypes")
public static boolean isEmpty(@Nullable final Object obj) {
if (obj == null) {
return true;
}
if (obj instanceof Optional) {
return !((Optional) obj).isPresent();
}
if (obj instanceof CharSequence) {
return ((CharSequence) obj).length() == 0;
}
if (obj.getClass().isArray()) {
return Array.getLength(obj) == 0;
}
if (obj instanceof Collection) {
return ((Collection) obj).isEmpty();
}
if (obj instanceof Map) {
return ((Map) obj).isEmpty();
}
// else
return false;
} | class class_name[name] begin[{]
method[isEmpty, return_type[type[boolean]], modifier[public static], parameter[obj]] begin[{]
if[binary_operation[member[.obj], ==, literal[null]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
if[binary_operation[member[.obj], instanceof, type[Optional]]] begin[{]
return[Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Optional, sub_type=None))]
else begin[{]
None
end[}]
if[binary_operation[member[.obj], instanceof, type[CharSequence]]] begin[{]
return[binary_operation[Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=CharSequence, sub_type=None)), ==, literal[0]]]
else begin[{]
None
end[}]
if[call[obj.getClass, parameter[]]] begin[{]
return[binary_operation[call[Array.getLength, parameter[member[.obj]]], ==, literal[0]]]
else begin[{]
None
end[}]
if[binary_operation[member[.obj], instanceof, type[Collection]]] begin[{]
return[Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Collection, sub_type=None))]
else begin[{]
None
end[}]
if[binary_operation[member[.obj], instanceof, type[Map]]] begin[{]
return[Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=None))]
else begin[{]
None
end[}]
return[literal[false]]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[boolean] identifier[isEmpty] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[Object] identifier[obj] operator[SEP] {
Keyword[if] operator[SEP] identifier[obj] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[if] operator[SEP] identifier[obj] Keyword[instanceof] identifier[Optional] operator[SEP] {
Keyword[return] operator[!] operator[SEP] operator[SEP] identifier[Optional] operator[SEP] identifier[obj] operator[SEP] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[obj] Keyword[instanceof] identifier[CharSequence] operator[SEP] {
Keyword[return] operator[SEP] operator[SEP] identifier[CharSequence] operator[SEP] identifier[obj] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP]
}
Keyword[if] operator[SEP] identifier[obj] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[isArray] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[Array] operator[SEP] identifier[getLength] operator[SEP] identifier[obj] operator[SEP] operator[==] Other[0] operator[SEP]
}
Keyword[if] operator[SEP] identifier[obj] Keyword[instanceof] identifier[Collection] operator[SEP] {
Keyword[return] operator[SEP] operator[SEP] identifier[Collection] operator[SEP] identifier[obj] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[obj] Keyword[instanceof] identifier[Map] operator[SEP] {
Keyword[return] operator[SEP] operator[SEP] identifier[Map] operator[SEP] identifier[obj] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] literal[boolean] operator[SEP]
}
|
public HttpSession resolve(ServerSocket socket) {
ServerTransport transport = socket.unwrap(ServerTransport.class);
ServerWebSocket ws = transport.unwrap(ServerWebSocket.class);
if (ws != null) {
String key = HttpSession.class.getName();
return (HttpSession) ws.unwrap(Session.class).getUserProperties().get(key);
}
ServerHttpExchange http = transport.unwrap(ServerHttpExchange.class);
if (http != null) {
return http.unwrap(HttpServletRequest.class).getSession(false);
}
return null;
} | class class_name[name] begin[{]
method[resolve, return_type[type[HttpSession]], modifier[public], parameter[socket]] begin[{]
local_variable[type[ServerTransport], transport]
local_variable[type[ServerWebSocket], ws]
if[binary_operation[member[.ws], !=, literal[null]]] begin[{]
local_variable[type[String], key]
return[Cast(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Session, sub_type=None))], member=unwrap, postfix_operators=[], prefix_operators=[], qualifier=ws, selectors=[MethodInvocation(arguments=[], member=getUserProperties, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=HttpSession, sub_type=None))]
else begin[{]
None
end[}]
local_variable[type[ServerHttpExchange], http]
if[binary_operation[member[.http], !=, literal[null]]] begin[{]
return[call[http.unwrap, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HttpServletRequest, sub_type=None))]]]
else begin[{]
None
end[}]
return[literal[null]]
end[}]
END[}] | Keyword[public] identifier[HttpSession] identifier[resolve] operator[SEP] identifier[ServerSocket] identifier[socket] operator[SEP] {
identifier[ServerTransport] identifier[transport] operator[=] identifier[socket] operator[SEP] identifier[unwrap] operator[SEP] identifier[ServerTransport] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[ServerWebSocket] identifier[ws] operator[=] identifier[transport] operator[SEP] identifier[unwrap] operator[SEP] identifier[ServerWebSocket] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ws] operator[!=] Other[null] operator[SEP] {
identifier[String] identifier[key] operator[=] identifier[HttpSession] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[HttpSession] operator[SEP] identifier[ws] operator[SEP] identifier[unwrap] operator[SEP] identifier[Session] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[getUserProperties] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP]
}
identifier[ServerHttpExchange] identifier[http] operator[=] identifier[transport] operator[SEP] identifier[unwrap] operator[SEP] identifier[ServerHttpExchange] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[http] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[http] operator[SEP] identifier[unwrap] operator[SEP] identifier[HttpServletRequest] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[getSession] operator[SEP] literal[boolean] operator[SEP] operator[SEP]
}
Keyword[return] Other[null] operator[SEP]
}
|
@SuppressWarnings("unchecked")
private String getFilteredXml(Document document, String xpathExpression) {
logger.entering(new Object[] { document, xpathExpression });
List<Node> nodes = (List<Node>) document.selectNodes(xpathExpression);
StringBuilder newDocument = new StringBuilder(document.asXML().length());
newDocument.append("<root>");
for (Node n : nodes) {
newDocument.append(n.asXML());
}
newDocument.append("</root>");
logger.exiting(newDocument);
return newDocument.toString();
} | class class_name[name] begin[{]
method[getFilteredXml, return_type[type[String]], modifier[private], parameter[document, xpathExpression]] begin[{]
call[logger.entering, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=document, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=xpathExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]]
local_variable[type[List], nodes]
local_variable[type[StringBuilder], newDocument]
call[newDocument.append, parameter[literal["<root>"]]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=asXML, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=newDocument, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=nodes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=n)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None))), label=None)
call[newDocument.append, parameter[literal["</root>"]]]
call[logger.exiting, parameter[member[.newDocument]]]
return[call[newDocument.toString, parameter[]]]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] identifier[String] identifier[getFilteredXml] operator[SEP] identifier[Document] identifier[document] , identifier[String] identifier[xpathExpression] operator[SEP] {
identifier[logger] operator[SEP] identifier[entering] operator[SEP] Keyword[new] identifier[Object] operator[SEP] operator[SEP] {
identifier[document] , identifier[xpathExpression]
} operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Node] operator[>] identifier[nodes] operator[=] operator[SEP] identifier[List] operator[<] identifier[Node] operator[>] operator[SEP] identifier[document] operator[SEP] identifier[selectNodes] operator[SEP] identifier[xpathExpression] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[newDocument] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[document] operator[SEP] identifier[asXML] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[newDocument] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Node] identifier[n] operator[:] identifier[nodes] operator[SEP] {
identifier[newDocument] operator[SEP] identifier[append] operator[SEP] identifier[n] operator[SEP] identifier[asXML] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
identifier[newDocument] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[exiting] operator[SEP] identifier[newDocument] operator[SEP] operator[SEP] Keyword[return] identifier[newDocument] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP]
}
|
@CheckReturnValue
public final ParallelFlowable<T> filter(@NonNull Predicate<? super T> predicate, @NonNull ParallelFailureHandling errorHandler) {
ObjectHelper.requireNonNull(predicate, "predicate");
ObjectHelper.requireNonNull(errorHandler, "errorHandler is null");
return RxJavaPlugins.onAssembly(new ParallelFilterTry<T>(this, predicate, errorHandler));
} | class class_name[name] begin[{]
method[filter, return_type[type[ParallelFlowable]], modifier[final public], parameter[predicate, errorHandler]] begin[{]
call[ObjectHelper.requireNonNull, parameter[member[.predicate], literal["predicate"]]]
call[ObjectHelper.requireNonNull, parameter[member[.errorHandler], literal["errorHandler is null"]]]
return[call[RxJavaPlugins.onAssembly, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=predicate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=errorHandler, 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=ParallelFilterTry, sub_type=None))]]]
end[}]
END[}] | annotation[@] identifier[CheckReturnValue] Keyword[public] Keyword[final] identifier[ParallelFlowable] operator[<] identifier[T] operator[>] identifier[filter] operator[SEP] annotation[@] identifier[NonNull] identifier[Predicate] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[predicate] , annotation[@] identifier[NonNull] identifier[ParallelFailureHandling] identifier[errorHandler] operator[SEP] {
identifier[ObjectHelper] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[predicate] , literal[String] operator[SEP] operator[SEP] identifier[ObjectHelper] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[errorHandler] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[RxJavaPlugins] operator[SEP] identifier[onAssembly] operator[SEP] Keyword[new] identifier[ParallelFilterTry] operator[<] identifier[T] operator[>] operator[SEP] Keyword[this] , identifier[predicate] , identifier[errorHandler] operator[SEP] operator[SEP] operator[SEP]
}
|
public static long optLong(@Nullable Bundle bundle, @Nullable String key, long fallback) {
if (bundle == null) {
return fallback;
}
return bundle.getLong(key, fallback);
} | class class_name[name] begin[{]
method[optLong, return_type[type[long]], modifier[public static], parameter[bundle, key, fallback]] begin[{]
if[binary_operation[member[.bundle], ==, literal[null]]] begin[{]
return[member[.fallback]]
else begin[{]
None
end[}]
return[call[bundle.getLong, parameter[member[.key], member[.fallback]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[long] identifier[optLong] operator[SEP] annotation[@] identifier[Nullable] identifier[Bundle] identifier[bundle] , annotation[@] identifier[Nullable] identifier[String] identifier[key] , Keyword[long] identifier[fallback] operator[SEP] {
Keyword[if] operator[SEP] identifier[bundle] operator[==] Other[null] operator[SEP] {
Keyword[return] identifier[fallback] operator[SEP]
}
Keyword[return] identifier[bundle] operator[SEP] identifier[getLong] operator[SEP] identifier[key] , identifier[fallback] operator[SEP] operator[SEP]
}
|
public Observable<ServiceResponse<BuildInner>> beginUpdateWithServiceResponseAsync(String resourceGroupName, String registryName, String buildId) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (registryName == null) {
throw new IllegalArgumentException("Parameter registryName is required and cannot be null.");
}
if (buildId == null) {
throw new IllegalArgumentException("Parameter buildId is required and cannot be null.");
}
final String apiVersion = "2018-02-01-preview";
final Boolean isArchiveEnabled = null;
BuildUpdateParameters buildUpdateParameters = new BuildUpdateParameters();
buildUpdateParameters.withIsArchiveEnabled(null);
return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, registryName, buildId, apiVersion, this.client.acceptLanguage(), buildUpdateParameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<BuildInner>>>() {
@Override
public Observable<ServiceResponse<BuildInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<BuildInner> clientResponse = beginUpdateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} | class class_name[name] begin[{]
method[beginUpdateWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, registryName, buildId]] begin[{]
if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.subscriptionId() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)
else begin[{]
None
end[}]
if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter resourceGroupName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)
else begin[{]
None
end[}]
if[binary_operation[member[.registryName], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter registryName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)
else begin[{]
None
end[}]
if[binary_operation[member[.buildId], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter buildId is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)
else begin[{]
None
end[}]
local_variable[type[String], apiVersion]
local_variable[type[Boolean], isArchiveEnabled]
local_variable[type[BuildUpdateParameters], buildUpdateParameters]
call[buildUpdateParameters.withIsArchiveEnabled, parameter[literal[null]]]
return[call[service.beginUpdate, parameter[THIS[member[None.client]call[None.subscriptionId, parameter[]]], member[.resourceGroupName], member[.registryName], member[.buildId], member[.apiVersion], THIS[member[None.client]call[None.acceptLanguage, parameter[]]], member[.buildUpdateParameters], THIS[member[None.client]call[None.userAgent, parameter[]]]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[BuildInner] operator[>] operator[>] identifier[beginUpdateWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[registryName] , identifier[String] identifier[buildId] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[resourceGroupName] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[registryName] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[buildId] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[final] identifier[String] identifier[apiVersion] operator[=] literal[String] operator[SEP] Keyword[final] identifier[Boolean] identifier[isArchiveEnabled] operator[=] Other[null] operator[SEP] identifier[BuildUpdateParameters] identifier[buildUpdateParameters] operator[=] Keyword[new] identifier[BuildUpdateParameters] operator[SEP] operator[SEP] operator[SEP] identifier[buildUpdateParameters] operator[SEP] identifier[withIsArchiveEnabled] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[service] operator[SEP] identifier[beginUpdate] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] , identifier[resourceGroupName] , identifier[registryName] , identifier[buildId] , identifier[apiVersion] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , identifier[buildUpdateParameters] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[BuildInner] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[BuildInner] operator[>] operator[>] identifier[call] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] {
Keyword[try] {
identifier[ServiceResponse] operator[<] identifier[BuildInner] operator[>] identifier[clientResponse] operator[=] identifier[beginUpdateDelegate] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] identifier[clientResponse] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] {
Keyword[return] identifier[Observable] operator[SEP] identifier[error] operator[SEP] identifier[t] operator[SEP] operator[SEP]
}
}
} operator[SEP] operator[SEP]
}
|
public void init(String st, int minsize, int maxsize) {
super.init(buildString(st.trim(), minsize), minsize, maxsize);
} | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[st, minsize, maxsize]] begin[{]
SuperMethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=st, selectors=[], type_arguments=None), MemberReference(member=minsize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=buildString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=minsize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxsize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=init, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
end[}]
END[}] | Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[String] identifier[st] , Keyword[int] identifier[minsize] , Keyword[int] identifier[maxsize] operator[SEP] {
Keyword[super] operator[SEP] identifier[init] operator[SEP] identifier[buildString] operator[SEP] identifier[st] operator[SEP] identifier[trim] operator[SEP] operator[SEP] , identifier[minsize] operator[SEP] , identifier[minsize] , identifier[maxsize] operator[SEP] operator[SEP]
}
|
public static String slug(String input, String separator) {
String slug = adaptSlug(input, separator);
return slug.toLowerCase(Locale.ENGLISH);
} | class class_name[name] begin[{]
method[slug, return_type[type[String]], modifier[public static], parameter[input, separator]] begin[{]
local_variable[type[String], slug]
return[call[slug.toLowerCase, parameter[member[Locale.ENGLISH]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[slug] operator[SEP] identifier[String] identifier[input] , identifier[String] identifier[separator] operator[SEP] {
identifier[String] identifier[slug] operator[=] identifier[adaptSlug] operator[SEP] identifier[input] , identifier[separator] operator[SEP] operator[SEP] Keyword[return] identifier[slug] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[Locale] operator[SEP] identifier[ENGLISH] operator[SEP] operator[SEP]
}
|
public void redo() {
if (!m_redo.isEmpty()) {
m_undo.push(m_current);
m_current = m_redo.pop();
changeEntityContentValues(
m_current.getEntityData(),
m_current.getEntityId(),
m_current.getAttributeName(),
m_current.getValueIndex(),
m_current.getType());
fireStateChange();
}
} | class class_name[name] begin[{]
method[redo, return_type[void], modifier[public], parameter[]] begin[{]
if[call[m_redo.isEmpty, parameter[]]] begin[{]
call[m_undo.push, parameter[member[.m_current]]]
assign[member[.m_current], call[m_redo.pop, parameter[]]]
call[.changeEntityContentValues, parameter[call[m_current.getEntityData, parameter[]], call[m_current.getEntityId, parameter[]], call[m_current.getAttributeName, parameter[]], call[m_current.getValueIndex, parameter[]], call[m_current.getType, parameter[]]]]
call[.fireStateChange, parameter[]]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[redo] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[m_redo] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
identifier[m_undo] operator[SEP] identifier[push] operator[SEP] identifier[m_current] operator[SEP] operator[SEP] identifier[m_current] operator[=] identifier[m_redo] operator[SEP] identifier[pop] operator[SEP] operator[SEP] operator[SEP] identifier[changeEntityContentValues] operator[SEP] identifier[m_current] operator[SEP] identifier[getEntityData] operator[SEP] operator[SEP] , identifier[m_current] operator[SEP] identifier[getEntityId] operator[SEP] operator[SEP] , identifier[m_current] operator[SEP] identifier[getAttributeName] operator[SEP] operator[SEP] , identifier[m_current] operator[SEP] identifier[getValueIndex] operator[SEP] operator[SEP] , identifier[m_current] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[fireStateChange] operator[SEP] operator[SEP] operator[SEP]
}
}
|
public static final <T extends BaseDateTime> Function<T[], Interval> baseDateTimeFieldArrayToInterval(DateTimeZone dateTimeZone) {
return FnInterval.baseDateTimeFieldArrayToInterval(dateTimeZone);
} | class class_name[name] begin[{]
method[baseDateTimeFieldArrayToInterval, return_type[type[Function]], modifier[final public static], parameter[dateTimeZone]] begin[{]
return[call[FnInterval.baseDateTimeFieldArrayToInterval, parameter[member[.dateTimeZone]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[final] operator[<] identifier[T] Keyword[extends] identifier[BaseDateTime] operator[>] identifier[Function] operator[<] identifier[T] operator[SEP] operator[SEP] , identifier[Interval] operator[>] identifier[baseDateTimeFieldArrayToInterval] operator[SEP] identifier[DateTimeZone] identifier[dateTimeZone] operator[SEP] {
Keyword[return] identifier[FnInterval] operator[SEP] identifier[baseDateTimeFieldArrayToInterval] operator[SEP] identifier[dateTimeZone] operator[SEP] operator[SEP]
}
|
@Override
public void destroy() {
ensureParentInitialized();
// execute Output Mappings (if they exist).
ensureActivityInitialized();
if (activity != null && activity.getIoMapping() != null && !skipIoMapping) {
activity.getIoMapping().executeOutputParameters(this);
}
clearExecution();
super.destroy();
removeEventSubscriptionsExceptCompensation();
} | class class_name[name] begin[{]
method[destroy, return_type[void], modifier[public], parameter[]] begin[{]
call[.ensureParentInitialized, parameter[]]
call[.ensureActivityInitialized, parameter[]]
if[binary_operation[binary_operation[binary_operation[member[.activity], !=, literal[null]], &&, binary_operation[call[activity.getIoMapping, parameter[]], !=, literal[null]]], &&, member[.skipIoMapping]]] begin[{]
call[activity.getIoMapping, parameter[]]
else begin[{]
None
end[}]
call[.clearExecution, parameter[]]
SuperMethodInvocation(arguments=[], member=destroy, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
call[.removeEventSubscriptionsExceptCompensation, parameter[]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] {
identifier[ensureParentInitialized] operator[SEP] operator[SEP] operator[SEP] identifier[ensureActivityInitialized] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[activity] operator[!=] Other[null] operator[&&] identifier[activity] operator[SEP] identifier[getIoMapping] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[skipIoMapping] operator[SEP] {
identifier[activity] operator[SEP] identifier[getIoMapping] operator[SEP] operator[SEP] operator[SEP] identifier[executeOutputParameters] operator[SEP] Keyword[this] operator[SEP] operator[SEP]
}
identifier[clearExecution] operator[SEP] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[destroy] operator[SEP] operator[SEP] operator[SEP] identifier[removeEventSubscriptionsExceptCompensation] operator[SEP] operator[SEP] operator[SEP]
}
|
public List<String> getRolesForUser(String name) {
try {
return model.model.get("g").get("g").rm.getRoles(name);
} catch (Error e) {
if (!e.getMessage().equals("error: name does not exist")) {
throw e;
}
}
return null;
} | class class_name[name] begin[{]
method[getRolesForUser, return_type[type[List]], modifier[public], parameter[name]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="g")], member=get, postfix_operators=[], prefix_operators=[], qualifier=model.model, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="g")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MemberReference(member=rm, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRoles, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=['!'], qualifier=e, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="error: name does not exist")], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Error']))], finally_block=None, label=None, resources=None)
return[literal[null]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getRolesForUser] operator[SEP] identifier[String] identifier[name] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[model] operator[SEP] identifier[model] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[rm] operator[SEP] identifier[getRoles] operator[SEP] identifier[name] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Error] identifier[e] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] {
Keyword[throw] identifier[e] operator[SEP]
}
}
Keyword[return] Other[null] operator[SEP]
}
|
public static <T extends Object> T getFieldValue(Object context,
Class<T> expectedType,
Field field) {
if (!field.isAccessible()) {
StringBuilder msg = new StringBuilder();
msg.append("Forcing accessibility for field ");
msg.append(field.getName());
msg.append(" on ");
msg.append(context.getClass().getName());
msg.append(". ");
Log.w(FieldUtils.class.getName(), msg.toString());
field.setAccessible(true);
}
Object valueObject = null;
try {
valueObject = field.get(context);
}
catch (IllegalArgumentException iae) {
StringBuilder msg = new StringBuilder();
msg.append("Activity ");
msg.append(context.getClass().getName());
msg.append(" is incompatible with the field ");
msg.append(field.getName());
msg.append(". ");
Log.e(FieldUtils.class.getName(), msg.toString(), iae);
}
catch (IllegalAccessException iae) {
StringBuilder msg = new StringBuilder();
msg.append("Field ");
msg.append(field.getName());
msg.append(" on ");
msg.append(context.getClass().getName());
msg.append(" cannot be accessed. ");
Log.e(FieldUtils.class.getName(), msg.toString(), iae);
}
return expectedType.cast(valueObject);
} | class class_name[name] begin[{]
method[getFieldValue, return_type[type[T]], modifier[public static], parameter[context, expectedType, field]] begin[{]
if[call[field.isAccessible, parameter[]]] begin[{]
local_variable[type[StringBuilder], msg]
call[msg.append, parameter[literal["Forcing accessibility for field "]]]
call[msg.append, parameter[call[field.getName, parameter[]]]]
call[msg.append, parameter[literal[" on "]]]
call[msg.append, parameter[call[context.getClass, parameter[]]]]
call[msg.append, parameter[literal[". "]]]
call[Log.w, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=FieldUtils, sub_type=None)), call[msg.toString, parameter[]]]]
call[field.setAccessible, parameter[literal[true]]]
else begin[{]
None
end[}]
local_variable[type[Object], valueObject]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=valueObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None)), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Activity ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is incompatible with the field ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=". ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=FieldUtils, sub_type=None)), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), MemberReference(member=iae, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=e, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=iae, types=['IllegalArgumentException'])), CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None)), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Field ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" on ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" cannot be accessed. ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=FieldUtils, sub_type=None)), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), MemberReference(member=iae, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=e, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=iae, types=['IllegalAccessException']))], finally_block=None, label=None, resources=None)
return[call[expectedType.cast, parameter[member[.valueObject]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Object] operator[>] identifier[T] identifier[getFieldValue] operator[SEP] identifier[Object] identifier[context] , identifier[Class] operator[<] identifier[T] operator[>] identifier[expectedType] , identifier[Field] identifier[field] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[field] operator[SEP] identifier[isAccessible] operator[SEP] operator[SEP] operator[SEP] {
identifier[StringBuilder] identifier[msg] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[context] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[w] operator[SEP] identifier[FieldUtils] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[setAccessible] operator[SEP] literal[boolean] operator[SEP] operator[SEP]
}
identifier[Object] identifier[valueObject] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[valueObject] operator[=] identifier[field] operator[SEP] identifier[get] operator[SEP] identifier[context] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[iae] operator[SEP] {
identifier[StringBuilder] identifier[msg] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[context] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[e] operator[SEP] identifier[FieldUtils] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[iae] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[iae] operator[SEP] {
identifier[StringBuilder] identifier[msg] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[context] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[e] operator[SEP] identifier[FieldUtils] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[iae] operator[SEP] operator[SEP]
}
Keyword[return] identifier[expectedType] operator[SEP] identifier[cast] operator[SEP] identifier[valueObject] operator[SEP] operator[SEP]
}
|
public List<Type> intersect(List<Type> cl1, List<Type> cl2) {
if (cl1 == cl2)
return cl1;
if (cl1.isEmpty() || cl2.isEmpty())
return List.nil();
if (cl1.head.tsym.precedes(cl2.head.tsym, this))
return intersect(cl1.tail, cl2);
if (cl2.head.tsym.precedes(cl1.head.tsym, this))
return intersect(cl1, cl2.tail);
if (isSameType(cl1.head, cl2.head))
return intersect(cl1.tail, cl2.tail).prepend(cl1.head);
if (cl1.head.tsym == cl2.head.tsym &&
cl1.head.hasTag(CLASS) && cl2.head.hasTag(CLASS)) {
if (cl1.head.isParameterized() && cl2.head.isParameterized()) {
Type merge = merge(cl1.head,cl2.head);
return intersect(cl1.tail, cl2.tail).prepend(merge);
}
if (cl1.head.isRaw() || cl2.head.isRaw())
return intersect(cl1.tail, cl2.tail).prepend(erasure(cl1.head));
}
return intersect(cl1.tail, cl2.tail);
} | class class_name[name] begin[{]
method[intersect, return_type[type[List]], modifier[public], parameter[cl1, cl2]] begin[{]
if[binary_operation[member[.cl1], ==, member[.cl2]]] begin[{]
return[member[.cl1]]
else begin[{]
None
end[}]
if[binary_operation[call[cl1.isEmpty, parameter[]], ||, call[cl2.isEmpty, parameter[]]]] begin[{]
return[call[List.nil, parameter[]]]
else begin[{]
None
end[}]
if[call[cl1.head.tsym.precedes, parameter[member[cl2.head.tsym], THIS[]]]] begin[{]
return[call[.intersect, parameter[member[cl1.tail], member[.cl2]]]]
else begin[{]
None
end[}]
if[call[cl2.head.tsym.precedes, parameter[member[cl1.head.tsym], THIS[]]]] begin[{]
return[call[.intersect, parameter[member[.cl1], member[cl2.tail]]]]
else begin[{]
None
end[}]
if[call[.isSameType, parameter[member[cl1.head], member[cl2.head]]]] begin[{]
return[call[.intersect, parameter[member[cl1.tail], member[cl2.tail]]]]
else begin[{]
None
end[}]
if[binary_operation[binary_operation[binary_operation[member[cl1.head.tsym], ==, member[cl2.head.tsym]], &&, call[cl1.head.hasTag, parameter[member[.CLASS]]]], &&, call[cl2.head.hasTag, parameter[member[.CLASS]]]]] begin[{]
if[binary_operation[call[cl1.head.isParameterized, parameter[]], &&, call[cl2.head.isParameterized, parameter[]]]] begin[{]
local_variable[type[Type], merge]
return[call[.intersect, parameter[member[cl1.tail], member[cl2.tail]]]]
else begin[{]
None
end[}]
if[binary_operation[call[cl1.head.isRaw, parameter[]], ||, call[cl2.head.isRaw, parameter[]]]] begin[{]
return[call[.intersect, parameter[member[cl1.tail], member[cl2.tail]]]]
else begin[{]
None
end[}]
else begin[{]
None
end[}]
return[call[.intersect, parameter[member[cl1.tail], member[cl2.tail]]]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[Type] operator[>] identifier[intersect] operator[SEP] identifier[List] operator[<] identifier[Type] operator[>] identifier[cl1] , identifier[List] operator[<] identifier[Type] operator[>] identifier[cl2] operator[SEP] {
Keyword[if] operator[SEP] identifier[cl1] operator[==] identifier[cl2] operator[SEP] Keyword[return] identifier[cl1] operator[SEP] Keyword[if] operator[SEP] identifier[cl1] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] identifier[cl2] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[List] operator[SEP] identifier[nil] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cl1] operator[SEP] identifier[head] operator[SEP] identifier[tsym] operator[SEP] identifier[precedes] operator[SEP] identifier[cl2] operator[SEP] identifier[head] operator[SEP] identifier[tsym] , Keyword[this] operator[SEP] operator[SEP] Keyword[return] identifier[intersect] operator[SEP] identifier[cl1] operator[SEP] identifier[tail] , identifier[cl2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cl2] operator[SEP] identifier[head] operator[SEP] identifier[tsym] operator[SEP] identifier[precedes] operator[SEP] identifier[cl1] operator[SEP] identifier[head] operator[SEP] identifier[tsym] , Keyword[this] operator[SEP] operator[SEP] Keyword[return] identifier[intersect] operator[SEP] identifier[cl1] , identifier[cl2] operator[SEP] identifier[tail] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isSameType] operator[SEP] identifier[cl1] operator[SEP] identifier[head] , identifier[cl2] operator[SEP] identifier[head] operator[SEP] operator[SEP] Keyword[return] identifier[intersect] operator[SEP] identifier[cl1] operator[SEP] identifier[tail] , identifier[cl2] operator[SEP] identifier[tail] operator[SEP] operator[SEP] identifier[prepend] operator[SEP] identifier[cl1] operator[SEP] identifier[head] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cl1] operator[SEP] identifier[head] operator[SEP] identifier[tsym] operator[==] identifier[cl2] operator[SEP] identifier[head] operator[SEP] identifier[tsym] operator[&&] identifier[cl1] operator[SEP] identifier[head] operator[SEP] identifier[hasTag] operator[SEP] identifier[CLASS] operator[SEP] operator[&&] identifier[cl2] operator[SEP] identifier[head] operator[SEP] identifier[hasTag] operator[SEP] identifier[CLASS] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[cl1] operator[SEP] identifier[head] operator[SEP] identifier[isParameterized] operator[SEP] operator[SEP] operator[&&] identifier[cl2] operator[SEP] identifier[head] operator[SEP] identifier[isParameterized] operator[SEP] operator[SEP] operator[SEP] {
identifier[Type] identifier[merge] operator[=] identifier[merge] operator[SEP] identifier[cl1] operator[SEP] identifier[head] , identifier[cl2] operator[SEP] identifier[head] operator[SEP] operator[SEP] Keyword[return] identifier[intersect] operator[SEP] identifier[cl1] operator[SEP] identifier[tail] , identifier[cl2] operator[SEP] identifier[tail] operator[SEP] operator[SEP] identifier[prepend] operator[SEP] identifier[merge] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[cl1] operator[SEP] identifier[head] operator[SEP] identifier[isRaw] operator[SEP] operator[SEP] operator[||] identifier[cl2] operator[SEP] identifier[head] operator[SEP] identifier[isRaw] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[intersect] operator[SEP] identifier[cl1] operator[SEP] identifier[tail] , identifier[cl2] operator[SEP] identifier[tail] operator[SEP] operator[SEP] identifier[prepend] operator[SEP] identifier[erasure] operator[SEP] identifier[cl1] operator[SEP] identifier[head] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] identifier[intersect] operator[SEP] identifier[cl1] operator[SEP] identifier[tail] , identifier[cl2] operator[SEP] identifier[tail] operator[SEP] operator[SEP]
}
|
public static DefaultConnectionFactory newLdaptiveConnectionFactory(final AbstractLdapProperties l) {
LOGGER.debug("Creating LDAP connection factory for [{}]", l.getLdapUrl());
val cc = newLdaptiveConnectionConfig(l);
val bindCf = new DefaultConnectionFactory(cc);
if (l.getProviderClass() != null) {
try {
val clazz = ClassUtils.getClass(l.getProviderClass());
bindCf.setProvider(Provider.class.cast(clazz.getDeclaredConstructor().newInstance()));
} catch (final Exception e) {
LOGGER.error(e.getMessage(), e);
}
}
return bindCf;
} | class class_name[name] begin[{]
method[newLdaptiveConnectionFactory, return_type[type[DefaultConnectionFactory]], modifier[public static], parameter[l]] begin[{]
call[LOGGER.debug, parameter[literal["Creating LDAP connection factory for [{}]"], call[l.getLdapUrl, parameter[]]]]
local_variable[type[val], cc]
local_variable[type[val], bindCf]
if[binary_operation[call[l.getProviderClass, parameter[]], !=, literal[null]]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getProviderClass, postfix_operators=[], prefix_operators=[], qualifier=l, selectors=[], type_arguments=None)], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=ClassUtils, selectors=[], type_arguments=None), name=clazz)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=val, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDeclaredConstructor, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[MethodInvocation(arguments=[], member=newInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=cast, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Provider, sub_type=None))], member=setProvider, postfix_operators=[], prefix_operators=[], qualifier=bindCf, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)
else begin[{]
None
end[}]
return[member[.bindCf]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[DefaultConnectionFactory] identifier[newLdaptiveConnectionFactory] operator[SEP] Keyword[final] identifier[AbstractLdapProperties] identifier[l] operator[SEP] {
identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[l] operator[SEP] identifier[getLdapUrl] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[val] identifier[cc] operator[=] identifier[newLdaptiveConnectionConfig] operator[SEP] identifier[l] operator[SEP] operator[SEP] identifier[val] identifier[bindCf] operator[=] Keyword[new] identifier[DefaultConnectionFactory] operator[SEP] identifier[cc] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[l] operator[SEP] identifier[getProviderClass] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] {
Keyword[try] {
identifier[val] identifier[clazz] operator[=] identifier[ClassUtils] operator[SEP] identifier[getClass] operator[SEP] identifier[l] operator[SEP] identifier[getProviderClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bindCf] operator[SEP] identifier[setProvider] operator[SEP] identifier[Provider] operator[SEP] Keyword[class] operator[SEP] identifier[cast] operator[SEP] identifier[clazz] operator[SEP] identifier[getDeclaredConstructor] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[e] operator[SEP] {
identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP]
}
}
Keyword[return] identifier[bindCf] operator[SEP]
}
|
public static TimingInfo unmodifiableTimingInfo(long startEpochTimeMilli, long startTimeNano, Long endTimeNano) {
return new TimingInfoUnmodifiable(startEpochTimeMilli, startTimeNano, endTimeNano);
} | class class_name[name] begin[{]
method[unmodifiableTimingInfo, return_type[type[TimingInfo]], modifier[public static], parameter[startEpochTimeMilli, startTimeNano, endTimeNano]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=startEpochTimeMilli, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=startTimeNano, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=endTimeNano, 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=TimingInfoUnmodifiable, sub_type=None))]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[TimingInfo] identifier[unmodifiableTimingInfo] operator[SEP] Keyword[long] identifier[startEpochTimeMilli] , Keyword[long] identifier[startTimeNano] , identifier[Long] identifier[endTimeNano] operator[SEP] {
Keyword[return] Keyword[new] identifier[TimingInfoUnmodifiable] operator[SEP] identifier[startEpochTimeMilli] , identifier[startTimeNano] , identifier[endTimeNano] operator[SEP] operator[SEP]
}
|
public OWLOntology loadOntologyFromFile(File file) throws OWLIOException
{
try
{
return owlOntologyManager.loadOntologyFromOntologyDocument(file);
} catch (OWLOntologyCreationException ex)
{
throw new OWLIOException(ioErrorMsg, ex);
}
} | class class_name[name] begin[{]
method[loadOntologyFromFile, return_type[type[OWLOntology]], modifier[public], parameter[file]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadOntologyFromOntologyDocument, postfix_operators=[], prefix_operators=[], qualifier=owlOntologyManager, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ioErrorMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OWLIOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['OWLOntologyCreationException']))], finally_block=None, label=None, resources=None)
end[}]
END[}] | Keyword[public] identifier[OWLOntology] identifier[loadOntologyFromFile] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[OWLIOException] {
Keyword[try] {
Keyword[return] identifier[owlOntologyManager] operator[SEP] identifier[loadOntologyFromOntologyDocument] operator[SEP] identifier[file] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[OWLOntologyCreationException] identifier[ex] operator[SEP] {
Keyword[throw] Keyword[new] identifier[OWLIOException] operator[SEP] identifier[ioErrorMsg] , identifier[ex] operator[SEP] operator[SEP]
}
}
|
@Override
public boolean cancel(final String appName, final String id,
final boolean isReplication) {
if (super.cancel(appName, id, isReplication)) {
replicateToPeers(Action.Cancel, appName, id, null, null, isReplication);
synchronized (lock) {
if (this.expectedNumberOfClientsSendingRenews > 0) {
// Since the client wants to cancel it, reduce the number of clients to send renews
this.expectedNumberOfClientsSendingRenews = this.expectedNumberOfClientsSendingRenews - 1;
updateRenewsPerMinThreshold();
}
}
return true;
}
return false;
} | class class_name[name] begin[{]
method[cancel, return_type[type[boolean]], modifier[public], parameter[appName, id, isReplication]] begin[{]
if[SuperMethodInvocation(arguments=[MemberReference(member=appName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isReplication, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cancel, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] begin[{]
call[.replicateToPeers, parameter[member[Action.Cancel], member[.appName], member[.id], literal[null], literal[null], member[.isReplication]]]
SYNCHRONIZED[member[.lock]] BEGIN[{]
if[binary_operation[THIS[member[None.expectedNumberOfClientsSendingRenews]], >, literal[0]]] begin[{]
assign[THIS[member[None.expectedNumberOfClientsSendingRenews]], binary_operation[THIS[member[None.expectedNumberOfClientsSendingRenews]], -, literal[1]]]
call[.updateRenewsPerMinThreshold, parameter[]]
else begin[{]
None
end[}]
END[}]
return[literal[true]]
else begin[{]
None
end[}]
return[literal[false]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[cancel] operator[SEP] Keyword[final] identifier[String] identifier[appName] , Keyword[final] identifier[String] identifier[id] , Keyword[final] Keyword[boolean] identifier[isReplication] operator[SEP] {
Keyword[if] operator[SEP] Keyword[super] operator[SEP] identifier[cancel] operator[SEP] identifier[appName] , identifier[id] , identifier[isReplication] operator[SEP] operator[SEP] {
identifier[replicateToPeers] operator[SEP] identifier[Action] operator[SEP] identifier[Cancel] , identifier[appName] , identifier[id] , Other[null] , Other[null] , identifier[isReplication] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[expectedNumberOfClientsSendingRenews] operator[>] Other[0] operator[SEP] {
Keyword[this] operator[SEP] identifier[expectedNumberOfClientsSendingRenews] operator[=] Keyword[this] operator[SEP] identifier[expectedNumberOfClientsSendingRenews] operator[-] Other[1] operator[SEP] identifier[updateRenewsPerMinThreshold] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[return] literal[boolean] operator[SEP]
}
|
private static DateValue[] removeDuplicates(DateValue[] dates) {
int k = 0;
for (int i = 1; i < dates.length; ++i) {
if (!dates[i].equals(dates[k])) {
dates[++k] = dates[i];
}
}
if (++k < dates.length) {
DateValue[] uniqueDates = new DateValue[k];
System.arraycopy(dates, 0, uniqueDates, 0, k);
return uniqueDates;
}
return dates;
} | class class_name[name] begin[{]
method[removeDuplicates, return_type[type[DateValue]], modifier[private static], parameter[dates]] begin[{]
local_variable[type[int], k]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=dates, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=dates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]))]), type==, value=MemberReference(member=dates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=dates, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None)
if[binary_operation[member[.k], <, member[dates.length]]] begin[{]
local_variable[type[DateValue], uniqueDates]
call[System.arraycopy, parameter[member[.dates], literal[0], member[.uniqueDates], literal[0], member[.k]]]
return[member[.uniqueDates]]
else begin[{]
None
end[}]
return[member[.dates]]
end[}]
END[}] | Keyword[private] Keyword[static] identifier[DateValue] operator[SEP] operator[SEP] identifier[removeDuplicates] operator[SEP] identifier[DateValue] operator[SEP] operator[SEP] identifier[dates] operator[SEP] {
Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[dates] operator[SEP] identifier[length] operator[SEP] operator[++] identifier[i] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[dates] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[dates] operator[SEP] identifier[k] operator[SEP] operator[SEP] operator[SEP] {
identifier[dates] operator[SEP] operator[++] identifier[k] operator[SEP] operator[=] identifier[dates] operator[SEP] identifier[i] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] operator[++] identifier[k] operator[<] identifier[dates] operator[SEP] identifier[length] operator[SEP] {
identifier[DateValue] operator[SEP] operator[SEP] identifier[uniqueDates] operator[=] Keyword[new] identifier[DateValue] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[dates] , Other[0] , identifier[uniqueDates] , Other[0] , identifier[k] operator[SEP] operator[SEP] Keyword[return] identifier[uniqueDates] operator[SEP]
}
Keyword[return] identifier[dates] operator[SEP]
}
|
@NonNull
public IconicsDrawable shadowDp(
@Dimension(unit = DP) float radiusDp,
@Dimension(unit = DP) float dxDp,
@Dimension(unit = DP) float dyDp,
@ColorInt int color) {
return shadowPx(
Utils.convertDpToPx(mContext, radiusDp),
Utils.convertDpToPx(mContext, dxDp),
Utils.convertDpToPx(mContext, dyDp),
color);
} | class class_name[name] begin[{]
method[shadowDp, return_type[type[IconicsDrawable]], modifier[public], parameter[radiusDp, dxDp, dyDp, color]] begin[{]
return[call[.shadowPx, parameter[call[Utils.convertDpToPx, parameter[member[.mContext], member[.radiusDp]]], call[Utils.convertDpToPx, parameter[member[.mContext], member[.dxDp]]], call[Utils.convertDpToPx, parameter[member[.mContext], member[.dyDp]]], member[.color]]]]
end[}]
END[}] | annotation[@] identifier[NonNull] Keyword[public] identifier[IconicsDrawable] identifier[shadowDp] operator[SEP] annotation[@] identifier[Dimension] operator[SEP] identifier[unit] operator[=] identifier[DP] operator[SEP] Keyword[float] identifier[radiusDp] , annotation[@] identifier[Dimension] operator[SEP] identifier[unit] operator[=] identifier[DP] operator[SEP] Keyword[float] identifier[dxDp] , annotation[@] identifier[Dimension] operator[SEP] identifier[unit] operator[=] identifier[DP] operator[SEP] Keyword[float] identifier[dyDp] , annotation[@] identifier[ColorInt] Keyword[int] identifier[color] operator[SEP] {
Keyword[return] identifier[shadowPx] operator[SEP] identifier[Utils] operator[SEP] identifier[convertDpToPx] operator[SEP] identifier[mContext] , identifier[radiusDp] operator[SEP] , identifier[Utils] operator[SEP] identifier[convertDpToPx] operator[SEP] identifier[mContext] , identifier[dxDp] operator[SEP] , identifier[Utils] operator[SEP] identifier[convertDpToPx] operator[SEP] identifier[mContext] , identifier[dyDp] operator[SEP] , identifier[color] operator[SEP] operator[SEP]
}
|
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
public static <T> Observable<T> error(final Throwable exception) {
ObjectHelper.requireNonNull(exception, "e is null");
return error(Functions.justCallable(exception));
} | class class_name[name] begin[{]
method[error, return_type[type[Observable]], modifier[public static], parameter[exception]] begin[{]
call[ObjectHelper.requireNonNull, parameter[member[.exception], literal["e is null"]]]
return[call[.error, parameter[call[Functions.justCallable, parameter[member[.exception]]]]]]
end[}]
END[}] | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Observable] operator[<] identifier[T] operator[>] identifier[error] operator[SEP] Keyword[final] identifier[Throwable] identifier[exception] operator[SEP] {
identifier[ObjectHelper] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[exception] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[error] operator[SEP] identifier[Functions] operator[SEP] identifier[justCallable] operator[SEP] identifier[exception] operator[SEP] operator[SEP] operator[SEP]
}
|
public List<TreeItem> getTree(Object projectIdOrPath, String filePath, String refName) throws GitLabApiException {
return (getTree(projectIdOrPath, filePath, refName, false));
} | class class_name[name] begin[{]
method[getTree, return_type[type[List]], modifier[public], parameter[projectIdOrPath, filePath, refName]] begin[{]
return[call[.getTree, parameter[member[.projectIdOrPath], member[.filePath], member[.refName], literal[false]]]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[TreeItem] operator[>] identifier[getTree] operator[SEP] identifier[Object] identifier[projectIdOrPath] , identifier[String] identifier[filePath] , identifier[String] identifier[refName] operator[SEP] Keyword[throws] identifier[GitLabApiException] {
Keyword[return] operator[SEP] identifier[getTree] operator[SEP] identifier[projectIdOrPath] , identifier[filePath] , identifier[refName] , literal[boolean] operator[SEP] operator[SEP] operator[SEP]
}
|
static int cmpEquivFold(CharSequence cs1, CharSequence cs2, int options) {
Normalizer2Impl nfcImpl;
UCaseProps csp;
/* current-level start/limit - s1/s2 as current */
int s1, s2, limit1, limit2;
/* decomposition and case folding variables */
int length;
/* stacks of previous-level start/current/limit */
CmpEquivLevel[] stack1=null, stack2=null;
/* buffers for algorithmic decompositions */
String decomp1, decomp2;
/* case folding buffers, only use current-level start/limit */
StringBuilder fold1, fold2;
/* track which is the current level per string */
int level1, level2;
/* current code units, and code points for lookups */
int c1, c2, cp1, cp2;
/* no argument error checking because this itself is not an API */
/*
* assume that at least one of the options _COMPARE_EQUIV and U_COMPARE_IGNORE_CASE is set
* otherwise this function must behave exactly as uprv_strCompare()
* not checking for that here makes testing this function easier
*/
/* normalization/properties data loaded? */
if((options&COMPARE_EQUIV)!=0) {
nfcImpl=Norm2AllModes.getNFCInstance().impl;
} else {
nfcImpl=null;
}
if((options&COMPARE_IGNORE_CASE)!=0) {
csp=UCaseProps.INSTANCE;
fold1=new StringBuilder();
fold2=new StringBuilder();
} else {
csp=null;
fold1=fold2=null;
}
/* initialize */
s1=0;
limit1=cs1.length();
s2=0;
limit2=cs2.length();
level1=level2=0;
c1=c2=-1;
/* comparison loop */
for(;;) {
/*
* here a code unit value of -1 means "get another code unit"
* below it will mean "this source is finished"
*/
if(c1<0) {
/* get next code unit from string 1, post-increment */
for(;;) {
if(s1==limit1) {
if(level1==0) {
c1=-1;
break;
}
} else {
c1=cs1.charAt(s1++);
break;
}
/* reached end of level buffer, pop one level */
do {
--level1;
cs1=stack1[level1].cs;
} while(cs1==null);
s1=stack1[level1].s;
limit1=cs1.length();
}
}
if(c2<0) {
/* get next code unit from string 2, post-increment */
for(;;) {
if(s2==limit2) {
if(level2==0) {
c2=-1;
break;
}
} else {
c2=cs2.charAt(s2++);
break;
}
/* reached end of level buffer, pop one level */
do {
--level2;
cs2=stack2[level2].cs;
} while(cs2==null);
s2=stack2[level2].s;
limit2=cs2.length();
}
}
/*
* compare c1 and c2
* either variable c1, c2 is -1 only if the corresponding string is finished
*/
if(c1==c2) {
if(c1<0) {
return 0; /* c1==c2==-1 indicating end of strings */
}
c1=c2=-1; /* make us fetch new code units */
continue;
} else if(c1<0) {
return -1; /* string 1 ends before string 2 */
} else if(c2<0) {
return 1; /* string 2 ends before string 1 */
}
/* c1!=c2 && c1>=0 && c2>=0 */
/* get complete code points for c1, c2 for lookups if either is a surrogate */
cp1=c1;
if(UTF16.isSurrogate((char)c1)) {
char c;
if(Normalizer2Impl.UTF16Plus.isSurrogateLead(c1)) {
if(s1!=limit1 && Character.isLowSurrogate(c=cs1.charAt(s1))) {
/* advance ++s1; only below if cp1 decomposes/case-folds */
cp1=Character.toCodePoint((char)c1, c);
}
} else /* isTrail(c1) */ {
if(0<=(s1-2) && Character.isHighSurrogate(c=cs1.charAt(s1-2))) {
cp1=Character.toCodePoint(c, (char)c1);
}
}
}
cp2=c2;
if(UTF16.isSurrogate((char)c2)) {
char c;
if(Normalizer2Impl.UTF16Plus.isSurrogateLead(c2)) {
if(s2!=limit2 && Character.isLowSurrogate(c=cs2.charAt(s2))) {
/* advance ++s2; only below if cp2 decomposes/case-folds */
cp2=Character.toCodePoint((char)c2, c);
}
} else /* isTrail(c2) */ {
if(0<=(s2-2) && Character.isHighSurrogate(c=cs2.charAt(s2-2))) {
cp2=Character.toCodePoint(c, (char)c2);
}
}
}
/*
* go down one level for each string
* continue with the main loop as soon as there is a real change
*/
if( level1==0 && (options&COMPARE_IGNORE_CASE)!=0 &&
(length=csp.toFullFolding(cp1, fold1, options))>=0
) {
/* cp1 case-folds to the code point "length" or to p[length] */
if(UTF16.isSurrogate((char)c1)) {
if(Normalizer2Impl.UTF16Plus.isSurrogateLead(c1)) {
/* advance beyond source surrogate pair if it case-folds */
++s1;
} else /* isTrail(c1) */ {
/*
* we got a supplementary code point when hitting its trail surrogate,
* therefore the lead surrogate must have been the same as in the other string;
* compare this decomposition with the lead surrogate in the other string
* remember that this simulates bulk text replacement:
* the decomposition would replace the entire code point
*/
--s2;
c2=cs2.charAt(s2-1);
}
}
/* push current level pointers */
if(stack1==null) {
stack1=createCmpEquivLevelStack();
}
stack1[0].cs=cs1;
stack1[0].s=s1;
++level1;
/* copy the folding result to fold1[] */
/* Java: the buffer was probably not empty, remove the old contents */
if(length<=UCaseProps.MAX_STRING_LENGTH) {
fold1.delete(0, fold1.length()-length);
} else {
fold1.setLength(0);
fold1.appendCodePoint(length);
}
/* set next level pointers to case folding */
cs1=fold1;
s1=0;
limit1=fold1.length();
/* get ready to read from decomposition, continue with loop */
c1=-1;
continue;
}
if( level2==0 && (options&COMPARE_IGNORE_CASE)!=0 &&
(length=csp.toFullFolding(cp2, fold2, options))>=0
) {
/* cp2 case-folds to the code point "length" or to p[length] */
if(UTF16.isSurrogate((char)c2)) {
if(Normalizer2Impl.UTF16Plus.isSurrogateLead(c2)) {
/* advance beyond source surrogate pair if it case-folds */
++s2;
} else /* isTrail(c2) */ {
/*
* we got a supplementary code point when hitting its trail surrogate,
* therefore the lead surrogate must have been the same as in the other string;
* compare this decomposition with the lead surrogate in the other string
* remember that this simulates bulk text replacement:
* the decomposition would replace the entire code point
*/
--s1;
c1=cs1.charAt(s1-1);
}
}
/* push current level pointers */
if(stack2==null) {
stack2=createCmpEquivLevelStack();
}
stack2[0].cs=cs2;
stack2[0].s=s2;
++level2;
/* copy the folding result to fold2[] */
/* Java: the buffer was probably not empty, remove the old contents */
if(length<=UCaseProps.MAX_STRING_LENGTH) {
fold2.delete(0, fold2.length()-length);
} else {
fold2.setLength(0);
fold2.appendCodePoint(length);
}
/* set next level pointers to case folding */
cs2=fold2;
s2=0;
limit2=fold2.length();
/* get ready to read from decomposition, continue with loop */
c2=-1;
continue;
}
if( level1<2 && (options&COMPARE_EQUIV)!=0 &&
(decomp1=nfcImpl.getDecomposition(cp1))!=null
) {
/* cp1 decomposes into p[length] */
if(UTF16.isSurrogate((char)c1)) {
if(Normalizer2Impl.UTF16Plus.isSurrogateLead(c1)) {
/* advance beyond source surrogate pair if it decomposes */
++s1;
} else /* isTrail(c1) */ {
/*
* we got a supplementary code point when hitting its trail surrogate,
* therefore the lead surrogate must have been the same as in the other string;
* compare this decomposition with the lead surrogate in the other string
* remember that this simulates bulk text replacement:
* the decomposition would replace the entire code point
*/
--s2;
c2=cs2.charAt(s2-1);
}
}
/* push current level pointers */
if(stack1==null) {
stack1=createCmpEquivLevelStack();
}
stack1[level1].cs=cs1;
stack1[level1].s=s1;
++level1;
/* set empty intermediate level if skipped */
if(level1<2) {
stack1[level1++].cs=null;
}
/* set next level pointers to decomposition */
cs1=decomp1;
s1=0;
limit1=decomp1.length();
/* get ready to read from decomposition, continue with loop */
c1=-1;
continue;
}
if( level2<2 && (options&COMPARE_EQUIV)!=0 &&
(decomp2=nfcImpl.getDecomposition(cp2))!=null
) {
/* cp2 decomposes into p[length] */
if(UTF16.isSurrogate((char)c2)) {
if(Normalizer2Impl.UTF16Plus.isSurrogateLead(c2)) {
/* advance beyond source surrogate pair if it decomposes */
++s2;
} else /* isTrail(c2) */ {
/*
* we got a supplementary code point when hitting its trail surrogate,
* therefore the lead surrogate must have been the same as in the other string;
* compare this decomposition with the lead surrogate in the other string
* remember that this simulates bulk text replacement:
* the decomposition would replace the entire code point
*/
--s1;
c1=cs1.charAt(s1-1);
}
}
/* push current level pointers */
if(stack2==null) {
stack2=createCmpEquivLevelStack();
}
stack2[level2].cs=cs2;
stack2[level2].s=s2;
++level2;
/* set empty intermediate level if skipped */
if(level2<2) {
stack2[level2++].cs=null;
}
/* set next level pointers to decomposition */
cs2=decomp2;
s2=0;
limit2=decomp2.length();
/* get ready to read from decomposition, continue with loop */
c2=-1;
continue;
}
/*
* no decomposition/case folding, max level for both sides:
* return difference result
*
* code point order comparison must not just return cp1-cp2
* because when single surrogates are present then the surrogate pairs
* that formed cp1 and cp2 may be from different string indexes
*
* example: { d800 d800 dc01 } vs. { d800 dc00 }, compare at second code units
* c1=d800 cp1=10001 c2=dc00 cp2=10000
* cp1-cp2>0 but c1-c2<0 and in fact in UTF-32 it is { d800 10001 } < { 10000 }
*
* therefore, use same fix-up as in ustring.c/uprv_strCompare()
* except: uprv_strCompare() fetches c=*s while this functions fetches c=*s++
* so we have slightly different pointer/start/limit comparisons here
*/
if(c1>=0xd800 && c2>=0xd800 && (options&COMPARE_CODE_POINT_ORDER)!=0) {
/* subtract 0x2800 from BMP code points to make them smaller than supplementary ones */
if(
(c1<=0xdbff && s1!=limit1 && Character.isLowSurrogate(cs1.charAt(s1))) ||
(Character.isLowSurrogate((char)c1) && 0!=(s1-1) && Character.isHighSurrogate(cs1.charAt(s1-2)))
) {
/* part of a surrogate pair, leave >=d800 */
} else {
/* BMP code point - may be surrogate code point - make <d800 */
c1-=0x2800;
}
if(
(c2<=0xdbff && s2!=limit2 && Character.isLowSurrogate(cs2.charAt(s2))) ||
(Character.isLowSurrogate((char)c2) && 0!=(s2-1) && Character.isHighSurrogate(cs2.charAt(s2-2)))
) {
/* part of a surrogate pair, leave >=d800 */
} else {
/* BMP code point - may be surrogate code point - make <d800 */
c2-=0x2800;
}
}
return c1-c2;
}
} | class class_name[name] begin[{]
method[cmpEquivFold, return_type[type[int]], modifier[static], parameter[cs1, cs2, options]] begin[{]
local_variable[type[Normalizer2Impl], nfcImpl]
local_variable[type[UCaseProps], csp]
local_variable[type[int], s1]
local_variable[type[int], length]
local_variable[type[CmpEquivLevel], stack1]
local_variable[type[String], decomp1]
local_variable[type[StringBuilder], fold1]
local_variable[type[int], level1]
local_variable[type[int], c1]
if[binary_operation[binary_operation[member[.options], &, member[.COMPARE_EQUIV]], !=, literal[0]]] begin[{]
assign[member[.nfcImpl], call[Norm2AllModes.getNFCInstance, parameter[]]]
else begin[{]
assign[member[.nfcImpl], literal[null]]
end[}]
if[binary_operation[binary_operation[member[.options], &, member[.COMPARE_IGNORE_CASE]], !=, literal[0]]] begin[{]
assign[member[.csp], member[UCaseProps.INSTANCE]]
assign[member[.fold1], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None))]
assign[member[.fold2], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None))]
else begin[{]
assign[member[.csp], literal[null]]
assign[member[.fold1], assign[member[.fold2], literal[null]]]
end[}]
assign[member[.s1], literal[0]]
assign[member[.limit1], call[cs1.length, parameter[]]]
assign[member[.s2], literal[0]]
assign[member[.limit2], call[cs2.length, parameter[]]]
assign[member[.level1], assign[member[.level2], literal[0]]]
assign[member[.c1], assign[member[.c2], literal[1]]]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=limit1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=s1, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=cs1, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=level1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c1, 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)]))])), DoStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=level1, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cs1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=stack1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=level1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=cs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=cs1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=stack1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=level1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=s, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=limit1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=cs1, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=None, init=None, update=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=limit2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=s2, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=cs2, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=level2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c2, 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)]))])), DoStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=level2, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cs2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=stack2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=level2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=cs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=cs2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=stack2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=level2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=s, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=limit2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=cs2, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=None, init=None, update=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Assignment(expressionl=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1))), label=None), ContinueStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cp1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=MethodInvocation(arguments=[Cast(expression=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))], member=isSurrogate, postfix_operators=[], prefix_operators=[], qualifier=UTF16, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isSurrogateLead, postfix_operators=[], prefix_operators=[], qualifier=Normalizer2Impl.UTF16Plus, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operandr=BinaryOperation(operandl=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=-), operator=<=), operandr=MethodInvocation(arguments=[Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=-)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=cs1, selectors=[], type_arguments=None))], member=isHighSurrogate, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=cp1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))], member=toCodePoint, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None)), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=limit1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operandr=MethodInvocation(arguments=[Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=cs1, selectors=[], type_arguments=None))], member=isLowSurrogate, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=cp1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Cast(expression=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char)), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toCodePoint, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None)), label=None)]))]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cp2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=MethodInvocation(arguments=[Cast(expression=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))], member=isSurrogate, postfix_operators=[], prefix_operators=[], qualifier=UTF16, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isSurrogateLead, postfix_operators=[], prefix_operators=[], qualifier=Normalizer2Impl.UTF16Plus, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operandr=BinaryOperation(operandl=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=-), operator=<=), operandr=MethodInvocation(arguments=[Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=-)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=cs2, selectors=[], type_arguments=None))], member=isHighSurrogate, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=cp2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))], member=toCodePoint, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None)), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=limit2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operandr=MethodInvocation(arguments=[Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=cs2, selectors=[], type_arguments=None))], member=isLowSurrogate, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=cp2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Cast(expression=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char)), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toCodePoint, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None)), label=None)]))]))])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=level1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=options, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COMPARE_IGNORE_CASE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), operator=&&), operandr=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=cp1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fold1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=options, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toFullFolding, postfix_operators=[], prefix_operators=[], qualifier=csp, 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=[IfStatement(condition=MethodInvocation(arguments=[Cast(expression=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))], member=isSurrogate, postfix_operators=[], prefix_operators=[], qualifier=UTF16, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isSurrogateLead, postfix_operators=[], prefix_operators=[], qualifier=Normalizer2Impl.UTF16Plus, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=s2, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=cs2, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=s1, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=stack1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=createCmpEquivLevelStack, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=cs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=cs1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=s, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MemberReference(member=level1, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MAX_STRING_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=UCaseProps, selectors=[]), operator=<=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=setLength, postfix_operators=[], prefix_operators=[], qualifier=fold1, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendCodePoint, postfix_operators=[], prefix_operators=[], qualifier=fold1, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=fold1, selectors=[], type_arguments=None), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=delete, postfix_operators=[], prefix_operators=[], qualifier=fold1, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cs1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=fold1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=limit1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=fold1, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None), ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=level2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=options, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COMPARE_IGNORE_CASE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), operator=&&), operandr=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=cp2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fold2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=options, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toFullFolding, postfix_operators=[], prefix_operators=[], qualifier=csp, 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=[IfStatement(condition=MethodInvocation(arguments=[Cast(expression=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))], member=isSurrogate, postfix_operators=[], prefix_operators=[], qualifier=UTF16, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isSurrogateLead, postfix_operators=[], prefix_operators=[], qualifier=Normalizer2Impl.UTF16Plus, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=s1, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=cs1, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=s2, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=stack2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=createCmpEquivLevelStack, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=cs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=cs2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=s, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MemberReference(member=level2, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MAX_STRING_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=UCaseProps, selectors=[]), operator=<=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=setLength, postfix_operators=[], prefix_operators=[], qualifier=fold2, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendCodePoint, postfix_operators=[], prefix_operators=[], qualifier=fold2, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=fold2, selectors=[], type_arguments=None), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=delete, postfix_operators=[], prefix_operators=[], qualifier=fold2, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cs2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=fold2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=limit2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=fold2, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None), ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=level1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=<), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=options, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COMPARE_EQUIV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), operator=&&), operandr=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=decomp1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=cp1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDecomposition, postfix_operators=[], prefix_operators=[], qualifier=nfcImpl, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Cast(expression=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))], member=isSurrogate, postfix_operators=[], prefix_operators=[], qualifier=UTF16, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isSurrogateLead, postfix_operators=[], prefix_operators=[], qualifier=Normalizer2Impl.UTF16Plus, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=s2, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=cs2, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=s1, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=stack1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=createCmpEquivLevelStack, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=level1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=cs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=cs1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=level1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=s, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MemberReference(member=level1, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=level1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=level1, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=cs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cs1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=decomp1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=limit1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=decomp1, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None), ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=level2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=<), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=options, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COMPARE_EQUIV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), operator=&&), operandr=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=decomp2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=cp2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDecomposition, postfix_operators=[], prefix_operators=[], qualifier=nfcImpl, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Cast(expression=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))], member=isSurrogate, postfix_operators=[], prefix_operators=[], qualifier=UTF16, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isSurrogateLead, postfix_operators=[], prefix_operators=[], qualifier=Normalizer2Impl.UTF16Plus, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=s1, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=cs1, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=s2, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=stack2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=createCmpEquivLevelStack, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=level2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=cs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=cs2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=level2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=s, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MemberReference(member=level2, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=level2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=level2, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=cs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cs2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=decomp2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=limit2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=decomp2, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None), ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xd800), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xd800), operator=>=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=options, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COMPARE_CODE_POINT_ORDER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xdbff), operator=<=), operandr=BinaryOperation(operandl=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=limit1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=&&), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=cs1, selectors=[], type_arguments=None)], member=isLowSurrogate, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Cast(expression=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))], member=isLowSurrogate, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operandr=BinaryOperation(operandl=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=!=), operator=&&), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=-)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=cs1, selectors=[], type_arguments=None)], member=isHighSurrogate, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), operator=&&), operator=||), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x2800)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xdbff), operator=<=), operandr=BinaryOperation(operandl=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=limit2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=&&), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=cs2, selectors=[], type_arguments=None)], member=isLowSurrogate, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Cast(expression=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))], member=isLowSurrogate, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operandr=BinaryOperation(operandl=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=!=), operator=&&), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=-)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=cs2, selectors=[], type_arguments=None)], member=isHighSurrogate, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), operator=&&), operator=||), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x2800)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[]))])), ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), label=None)]), control=ForControl(condition=None, init=None, update=None), label=None)
end[}]
END[}] | Keyword[static] Keyword[int] identifier[cmpEquivFold] operator[SEP] identifier[CharSequence] identifier[cs1] , identifier[CharSequence] identifier[cs2] , Keyword[int] identifier[options] operator[SEP] {
identifier[Normalizer2Impl] identifier[nfcImpl] operator[SEP] identifier[UCaseProps] identifier[csp] operator[SEP] Keyword[int] identifier[s1] , identifier[s2] , identifier[limit1] , identifier[limit2] operator[SEP] Keyword[int] identifier[length] operator[SEP] identifier[CmpEquivLevel] operator[SEP] operator[SEP] identifier[stack1] operator[=] Other[null] , identifier[stack2] operator[=] Other[null] operator[SEP] identifier[String] identifier[decomp1] , identifier[decomp2] operator[SEP] identifier[StringBuilder] identifier[fold1] , identifier[fold2] operator[SEP] Keyword[int] identifier[level1] , identifier[level2] operator[SEP] Keyword[int] identifier[c1] , identifier[c2] , identifier[cp1] , identifier[cp2] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[options] operator[&] identifier[COMPARE_EQUIV] operator[SEP] operator[!=] Other[0] operator[SEP] {
identifier[nfcImpl] operator[=] identifier[Norm2AllModes] operator[SEP] identifier[getNFCInstance] operator[SEP] operator[SEP] operator[SEP] identifier[impl] operator[SEP]
}
Keyword[else] {
identifier[nfcImpl] operator[=] Other[null] operator[SEP]
}
Keyword[if] operator[SEP] operator[SEP] identifier[options] operator[&] identifier[COMPARE_IGNORE_CASE] operator[SEP] operator[!=] Other[0] operator[SEP] {
identifier[csp] operator[=] identifier[UCaseProps] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[fold1] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[fold2] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[csp] operator[=] Other[null] operator[SEP] identifier[fold1] operator[=] identifier[fold2] operator[=] Other[null] operator[SEP]
}
identifier[s1] operator[=] Other[0] operator[SEP] identifier[limit1] operator[=] identifier[cs1] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[s2] operator[=] Other[0] operator[SEP] identifier[limit2] operator[=] identifier[cs2] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[level1] operator[=] identifier[level2] operator[=] Other[0] operator[SEP] identifier[c1] operator[=] identifier[c2] operator[=] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[c1] operator[<] Other[0] operator[SEP] {
Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[s1] operator[==] identifier[limit1] operator[SEP] {
Keyword[if] operator[SEP] identifier[level1] operator[==] Other[0] operator[SEP] {
identifier[c1] operator[=] operator[-] Other[1] operator[SEP] Keyword[break] operator[SEP]
}
}
Keyword[else] {
identifier[c1] operator[=] identifier[cs1] operator[SEP] identifier[charAt] operator[SEP] identifier[s1] operator[++] operator[SEP] operator[SEP] Keyword[break] operator[SEP]
}
Keyword[do] {
operator[--] identifier[level1] operator[SEP] identifier[cs1] operator[=] identifier[stack1] operator[SEP] identifier[level1] operator[SEP] operator[SEP] identifier[cs] operator[SEP]
}
Keyword[while] operator[SEP] identifier[cs1] operator[==] Other[null] operator[SEP] operator[SEP] identifier[s1] operator[=] identifier[stack1] operator[SEP] identifier[level1] operator[SEP] operator[SEP] identifier[s] operator[SEP] identifier[limit1] operator[=] identifier[cs1] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[c2] operator[<] Other[0] operator[SEP] {
Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[s2] operator[==] identifier[limit2] operator[SEP] {
Keyword[if] operator[SEP] identifier[level2] operator[==] Other[0] operator[SEP] {
identifier[c2] operator[=] operator[-] Other[1] operator[SEP] Keyword[break] operator[SEP]
}
}
Keyword[else] {
identifier[c2] operator[=] identifier[cs2] operator[SEP] identifier[charAt] operator[SEP] identifier[s2] operator[++] operator[SEP] operator[SEP] Keyword[break] operator[SEP]
}
Keyword[do] {
operator[--] identifier[level2] operator[SEP] identifier[cs2] operator[=] identifier[stack2] operator[SEP] identifier[level2] operator[SEP] operator[SEP] identifier[cs] operator[SEP]
}
Keyword[while] operator[SEP] identifier[cs2] operator[==] Other[null] operator[SEP] operator[SEP] identifier[s2] operator[=] identifier[stack2] operator[SEP] identifier[level2] operator[SEP] operator[SEP] identifier[s] operator[SEP] identifier[limit2] operator[=] identifier[cs2] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[c1] operator[==] identifier[c2] operator[SEP] {
Keyword[if] operator[SEP] identifier[c1] operator[<] Other[0] operator[SEP] {
Keyword[return] Other[0] operator[SEP]
}
identifier[c1] operator[=] identifier[c2] operator[=] operator[-] Other[1] operator[SEP] Keyword[continue] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[c1] operator[<] Other[0] operator[SEP] {
Keyword[return] operator[-] Other[1] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[c2] operator[<] Other[0] operator[SEP] {
Keyword[return] Other[1] operator[SEP]
}
identifier[cp1] operator[=] identifier[c1] operator[SEP] Keyword[if] operator[SEP] identifier[UTF16] operator[SEP] identifier[isSurrogate] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c1] operator[SEP] operator[SEP] {
Keyword[char] identifier[c] operator[SEP] Keyword[if] operator[SEP] identifier[Normalizer2Impl] operator[SEP] identifier[UTF16Plus] operator[SEP] identifier[isSurrogateLead] operator[SEP] identifier[c1] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[s1] operator[!=] identifier[limit1] operator[&&] identifier[Character] operator[SEP] identifier[isLowSurrogate] operator[SEP] identifier[c] operator[=] identifier[cs1] operator[SEP] identifier[charAt] operator[SEP] identifier[s1] operator[SEP] operator[SEP] operator[SEP] {
identifier[cp1] operator[=] identifier[Character] operator[SEP] identifier[toCodePoint] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c1] , identifier[c] operator[SEP] operator[SEP]
}
}
Keyword[else] {
Keyword[if] operator[SEP] Other[0] operator[<=] operator[SEP] identifier[s1] operator[-] Other[2] operator[SEP] operator[&&] identifier[Character] operator[SEP] identifier[isHighSurrogate] operator[SEP] identifier[c] operator[=] identifier[cs1] operator[SEP] identifier[charAt] operator[SEP] identifier[s1] operator[-] Other[2] operator[SEP] operator[SEP] operator[SEP] {
identifier[cp1] operator[=] identifier[Character] operator[SEP] identifier[toCodePoint] operator[SEP] identifier[c] , operator[SEP] Keyword[char] operator[SEP] identifier[c1] operator[SEP] operator[SEP]
}
}
}
identifier[cp2] operator[=] identifier[c2] operator[SEP] Keyword[if] operator[SEP] identifier[UTF16] operator[SEP] identifier[isSurrogate] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c2] operator[SEP] operator[SEP] {
Keyword[char] identifier[c] operator[SEP] Keyword[if] operator[SEP] identifier[Normalizer2Impl] operator[SEP] identifier[UTF16Plus] operator[SEP] identifier[isSurrogateLead] operator[SEP] identifier[c2] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[s2] operator[!=] identifier[limit2] operator[&&] identifier[Character] operator[SEP] identifier[isLowSurrogate] operator[SEP] identifier[c] operator[=] identifier[cs2] operator[SEP] identifier[charAt] operator[SEP] identifier[s2] operator[SEP] operator[SEP] operator[SEP] {
identifier[cp2] operator[=] identifier[Character] operator[SEP] identifier[toCodePoint] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c2] , identifier[c] operator[SEP] operator[SEP]
}
}
Keyword[else] {
Keyword[if] operator[SEP] Other[0] operator[<=] operator[SEP] identifier[s2] operator[-] Other[2] operator[SEP] operator[&&] identifier[Character] operator[SEP] identifier[isHighSurrogate] operator[SEP] identifier[c] operator[=] identifier[cs2] operator[SEP] identifier[charAt] operator[SEP] identifier[s2] operator[-] Other[2] operator[SEP] operator[SEP] operator[SEP] {
identifier[cp2] operator[=] identifier[Character] operator[SEP] identifier[toCodePoint] operator[SEP] identifier[c] , operator[SEP] Keyword[char] operator[SEP] identifier[c2] operator[SEP] operator[SEP]
}
}
}
Keyword[if] operator[SEP] identifier[level1] operator[==] Other[0] operator[&&] operator[SEP] identifier[options] operator[&] identifier[COMPARE_IGNORE_CASE] operator[SEP] operator[!=] Other[0] operator[&&] operator[SEP] identifier[length] operator[=] identifier[csp] operator[SEP] identifier[toFullFolding] operator[SEP] identifier[cp1] , identifier[fold1] , identifier[options] operator[SEP] operator[SEP] operator[>=] Other[0] operator[SEP] {
Keyword[if] operator[SEP] identifier[UTF16] operator[SEP] identifier[isSurrogate] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c1] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[Normalizer2Impl] operator[SEP] identifier[UTF16Plus] operator[SEP] identifier[isSurrogateLead] operator[SEP] identifier[c1] operator[SEP] operator[SEP] {
operator[++] identifier[s1] operator[SEP]
}
Keyword[else] {
operator[--] identifier[s2] operator[SEP] identifier[c2] operator[=] identifier[cs2] operator[SEP] identifier[charAt] operator[SEP] identifier[s2] operator[-] Other[1] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[stack1] operator[==] Other[null] operator[SEP] {
identifier[stack1] operator[=] identifier[createCmpEquivLevelStack] operator[SEP] operator[SEP] operator[SEP]
}
identifier[stack1] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[cs] operator[=] identifier[cs1] operator[SEP] identifier[stack1] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[s] operator[=] identifier[s1] operator[SEP] operator[++] identifier[level1] operator[SEP] Keyword[if] operator[SEP] identifier[length] operator[<=] identifier[UCaseProps] operator[SEP] identifier[MAX_STRING_LENGTH] operator[SEP] {
identifier[fold1] operator[SEP] identifier[delete] operator[SEP] Other[0] , identifier[fold1] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] identifier[length] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[fold1] operator[SEP] identifier[setLength] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[fold1] operator[SEP] identifier[appendCodePoint] operator[SEP] identifier[length] operator[SEP] operator[SEP]
}
identifier[cs1] operator[=] identifier[fold1] operator[SEP] identifier[s1] operator[=] Other[0] operator[SEP] identifier[limit1] operator[=] identifier[fold1] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[c1] operator[=] operator[-] Other[1] operator[SEP] Keyword[continue] operator[SEP]
}
Keyword[if] operator[SEP] identifier[level2] operator[==] Other[0] operator[&&] operator[SEP] identifier[options] operator[&] identifier[COMPARE_IGNORE_CASE] operator[SEP] operator[!=] Other[0] operator[&&] operator[SEP] identifier[length] operator[=] identifier[csp] operator[SEP] identifier[toFullFolding] operator[SEP] identifier[cp2] , identifier[fold2] , identifier[options] operator[SEP] operator[SEP] operator[>=] Other[0] operator[SEP] {
Keyword[if] operator[SEP] identifier[UTF16] operator[SEP] identifier[isSurrogate] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c2] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[Normalizer2Impl] operator[SEP] identifier[UTF16Plus] operator[SEP] identifier[isSurrogateLead] operator[SEP] identifier[c2] operator[SEP] operator[SEP] {
operator[++] identifier[s2] operator[SEP]
}
Keyword[else] {
operator[--] identifier[s1] operator[SEP] identifier[c1] operator[=] identifier[cs1] operator[SEP] identifier[charAt] operator[SEP] identifier[s1] operator[-] Other[1] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[stack2] operator[==] Other[null] operator[SEP] {
identifier[stack2] operator[=] identifier[createCmpEquivLevelStack] operator[SEP] operator[SEP] operator[SEP]
}
identifier[stack2] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[cs] operator[=] identifier[cs2] operator[SEP] identifier[stack2] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[s] operator[=] identifier[s2] operator[SEP] operator[++] identifier[level2] operator[SEP] Keyword[if] operator[SEP] identifier[length] operator[<=] identifier[UCaseProps] operator[SEP] identifier[MAX_STRING_LENGTH] operator[SEP] {
identifier[fold2] operator[SEP] identifier[delete] operator[SEP] Other[0] , identifier[fold2] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] identifier[length] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[fold2] operator[SEP] identifier[setLength] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[fold2] operator[SEP] identifier[appendCodePoint] operator[SEP] identifier[length] operator[SEP] operator[SEP]
}
identifier[cs2] operator[=] identifier[fold2] operator[SEP] identifier[s2] operator[=] Other[0] operator[SEP] identifier[limit2] operator[=] identifier[fold2] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[c2] operator[=] operator[-] Other[1] operator[SEP] Keyword[continue] operator[SEP]
}
Keyword[if] operator[SEP] identifier[level1] operator[<] Other[2] operator[&&] operator[SEP] identifier[options] operator[&] identifier[COMPARE_EQUIV] operator[SEP] operator[!=] Other[0] operator[&&] operator[SEP] identifier[decomp1] operator[=] identifier[nfcImpl] operator[SEP] identifier[getDecomposition] operator[SEP] identifier[cp1] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[UTF16] operator[SEP] identifier[isSurrogate] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c1] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[Normalizer2Impl] operator[SEP] identifier[UTF16Plus] operator[SEP] identifier[isSurrogateLead] operator[SEP] identifier[c1] operator[SEP] operator[SEP] {
operator[++] identifier[s1] operator[SEP]
}
Keyword[else] {
operator[--] identifier[s2] operator[SEP] identifier[c2] operator[=] identifier[cs2] operator[SEP] identifier[charAt] operator[SEP] identifier[s2] operator[-] Other[1] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[stack1] operator[==] Other[null] operator[SEP] {
identifier[stack1] operator[=] identifier[createCmpEquivLevelStack] operator[SEP] operator[SEP] operator[SEP]
}
identifier[stack1] operator[SEP] identifier[level1] operator[SEP] operator[SEP] identifier[cs] operator[=] identifier[cs1] operator[SEP] identifier[stack1] operator[SEP] identifier[level1] operator[SEP] operator[SEP] identifier[s] operator[=] identifier[s1] operator[SEP] operator[++] identifier[level1] operator[SEP] Keyword[if] operator[SEP] identifier[level1] operator[<] Other[2] operator[SEP] {
identifier[stack1] operator[SEP] identifier[level1] operator[++] operator[SEP] operator[SEP] identifier[cs] operator[=] Other[null] operator[SEP]
}
identifier[cs1] operator[=] identifier[decomp1] operator[SEP] identifier[s1] operator[=] Other[0] operator[SEP] identifier[limit1] operator[=] identifier[decomp1] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[c1] operator[=] operator[-] Other[1] operator[SEP] Keyword[continue] operator[SEP]
}
Keyword[if] operator[SEP] identifier[level2] operator[<] Other[2] operator[&&] operator[SEP] identifier[options] operator[&] identifier[COMPARE_EQUIV] operator[SEP] operator[!=] Other[0] operator[&&] operator[SEP] identifier[decomp2] operator[=] identifier[nfcImpl] operator[SEP] identifier[getDecomposition] operator[SEP] identifier[cp2] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[UTF16] operator[SEP] identifier[isSurrogate] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c2] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[Normalizer2Impl] operator[SEP] identifier[UTF16Plus] operator[SEP] identifier[isSurrogateLead] operator[SEP] identifier[c2] operator[SEP] operator[SEP] {
operator[++] identifier[s2] operator[SEP]
}
Keyword[else] {
operator[--] identifier[s1] operator[SEP] identifier[c1] operator[=] identifier[cs1] operator[SEP] identifier[charAt] operator[SEP] identifier[s1] operator[-] Other[1] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[stack2] operator[==] Other[null] operator[SEP] {
identifier[stack2] operator[=] identifier[createCmpEquivLevelStack] operator[SEP] operator[SEP] operator[SEP]
}
identifier[stack2] operator[SEP] identifier[level2] operator[SEP] operator[SEP] identifier[cs] operator[=] identifier[cs2] operator[SEP] identifier[stack2] operator[SEP] identifier[level2] operator[SEP] operator[SEP] identifier[s] operator[=] identifier[s2] operator[SEP] operator[++] identifier[level2] operator[SEP] Keyword[if] operator[SEP] identifier[level2] operator[<] Other[2] operator[SEP] {
identifier[stack2] operator[SEP] identifier[level2] operator[++] operator[SEP] operator[SEP] identifier[cs] operator[=] Other[null] operator[SEP]
}
identifier[cs2] operator[=] identifier[decomp2] operator[SEP] identifier[s2] operator[=] Other[0] operator[SEP] identifier[limit2] operator[=] identifier[decomp2] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[c2] operator[=] operator[-] Other[1] operator[SEP] Keyword[continue] operator[SEP]
}
Keyword[if] operator[SEP] identifier[c1] operator[>=] literal[Integer] operator[&&] identifier[c2] operator[>=] literal[Integer] operator[&&] operator[SEP] identifier[options] operator[&] identifier[COMPARE_CODE_POINT_ORDER] operator[SEP] operator[!=] Other[0] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[c1] operator[<=] literal[Integer] operator[&&] identifier[s1] operator[!=] identifier[limit1] operator[&&] identifier[Character] operator[SEP] identifier[isLowSurrogate] operator[SEP] identifier[cs1] operator[SEP] identifier[charAt] operator[SEP] identifier[s1] operator[SEP] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[Character] operator[SEP] identifier[isLowSurrogate] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c1] operator[SEP] operator[&&] Other[0] operator[!=] operator[SEP] identifier[s1] operator[-] Other[1] operator[SEP] operator[&&] identifier[Character] operator[SEP] identifier[isHighSurrogate] operator[SEP] identifier[cs1] operator[SEP] identifier[charAt] operator[SEP] identifier[s1] operator[-] Other[2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
}
Keyword[else] {
identifier[c1] operator[-=] literal[Integer] operator[SEP]
}
Keyword[if] operator[SEP] operator[SEP] identifier[c2] operator[<=] literal[Integer] operator[&&] identifier[s2] operator[!=] identifier[limit2] operator[&&] identifier[Character] operator[SEP] identifier[isLowSurrogate] operator[SEP] identifier[cs2] operator[SEP] identifier[charAt] operator[SEP] identifier[s2] operator[SEP] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[Character] operator[SEP] identifier[isLowSurrogate] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c2] operator[SEP] operator[&&] Other[0] operator[!=] operator[SEP] identifier[s2] operator[-] Other[1] operator[SEP] operator[&&] identifier[Character] operator[SEP] identifier[isHighSurrogate] operator[SEP] identifier[cs2] operator[SEP] identifier[charAt] operator[SEP] identifier[s2] operator[-] Other[2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
}
Keyword[else] {
identifier[c2] operator[-=] literal[Integer] operator[SEP]
}
}
Keyword[return] identifier[c1] operator[-] identifier[c2] operator[SEP]
}
}
|
public void initTransfer(Properties properties)
{
super.initTransfer(properties);
m_strRootPath = properties.getProperty(SOURCE_ROOT_PATHNAME_PARAM);
m_iCurrentLevel = -1;
} | class class_name[name] begin[{]
method[initTransfer, return_type[void], modifier[public], parameter[properties]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=properties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initTransfer, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
assign[member[.m_strRootPath], call[properties.getProperty, parameter[member[.SOURCE_ROOT_PATHNAME_PARAM]]]]
assign[member[.m_iCurrentLevel], literal[1]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[initTransfer] operator[SEP] identifier[Properties] identifier[properties] operator[SEP] {
Keyword[super] operator[SEP] identifier[initTransfer] operator[SEP] identifier[properties] operator[SEP] operator[SEP] identifier[m_strRootPath] operator[=] identifier[properties] operator[SEP] identifier[getProperty] operator[SEP] identifier[SOURCE_ROOT_PATHNAME_PARAM] operator[SEP] operator[SEP] identifier[m_iCurrentLevel] operator[=] operator[-] Other[1] operator[SEP]
}
|
private void initGUI() {
Font fFont = new Font("Dialog", Font.PLAIN, 12);
setLayout(new BorderLayout());
Panel p = new Panel();
p.setBackground(SystemColor.control);
p.setLayout(new GridLayout(16, 1));
tSourceTable = new TextField();
tSourceTable.setEnabled(false);
tDestTable = new TextField();
tDestTable.addActionListener(this);
tDestDrop = new TextField();
tDestDrop.addActionListener(this);
tDestCreate = new TextField();
tDestCreate.addActionListener(this);
tDestDelete = new TextField();
tDestDelete.addActionListener(this);
tDestCreateIndex = new TextField();
tDestCreateIndex.addActionListener(this);
tDestDropIndex = new TextField();
tDestDropIndex.addActionListener(this);
tSourceSelect = new TextField();
tSourceSelect.addActionListener(this);
tDestInsert = new TextField();
tDestInsert.addActionListener(this);
tDestAlter = new TextField();
tDestAlter.addActionListener(this);
cTransfer = new Checkbox("Transfer to destination table", true);
cTransfer.addItemListener(this);
cDrop = new Checkbox("Drop destination table (ignore error)", true);
cDrop.addItemListener(this);
cCreate = new Checkbox("Create destination table", true);
cCreate.addItemListener(this);
cDropIndex = new Checkbox("Drop destination index (ignore error)",
true);
cDropIndex.addItemListener(this);
cIdxForced = new Checkbox("force Idx_ prefix for indexes names",
false);
cIdxForced.addItemListener(this);
cCreateIndex = new Checkbox("Create destination index", true);
cCreateIndex.addItemListener(this);
cDelete = new Checkbox("Delete rows in destination table", true);
cDelete.addItemListener(this);
cInsert = new Checkbox("Insert into destination", true);
cInsert.addItemListener(this);
cFKForced = new Checkbox("force FK_ prefix for foreign key names",
false);
cFKForced.addItemListener(this);
cAlter = new Checkbox("Alter destination table", true);
cAlter.addItemListener(this);
p.add(createLabel("Source table"));
p.add(tSourceTable);
p.add(cTransfer);
p.add(tDestTable);
p.add(cDrop);
p.add(tDestDrop);
p.add(cCreate);
p.add(tDestCreate);
p.add(cDropIndex);
p.add(tDestDropIndex);
p.add(cCreateIndex);
p.add(tDestCreateIndex);
p.add(cDelete);
p.add(tDestDelete);
p.add(cAlter);
p.add(tDestAlter);
p.add(createLabel("Select source records"));
p.add(tSourceSelect);
p.add(cInsert);
p.add(tDestInsert);
p.add(createLabel(""));
p.add(createLabel(""));
p.add(cIdxForced);
p.add(cFKForced);
p.add(createLabel(""));
p.add(createLabel(""));
if (iTransferMode == TRFM_TRANSFER) {
bStart = new Button("Start Transfer");
bContinue = new Button("Continue Transfer");
bContinue.setEnabled(false);
} else if (iTransferMode == Transfer.TRFM_DUMP) {
bStart = new Button("Start Dump");
} else if (iTransferMode == Transfer.TRFM_RESTORE) {
bStart = new Button("Start Restore");
}
bStart.addActionListener(this);
p.add(bStart);
if (iTransferMode == TRFM_TRANSFER) {
bContinue.addActionListener(this);
p.add(bContinue);
}
bStart.setEnabled(false);
fMain.add("Center", createBorderPanel(p));
lTable = new java.awt.List(10);
lTable.addItemListener(this);
fMain.add("West", createBorderPanel(lTable));
tMessage = new TextField();
Panel pMessage = createBorderPanel(tMessage);
fMain.add("South", pMessage);
} | class class_name[name] begin[{]
method[initGUI, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[Font], fFont]
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=BorderLayout, sub_type=None))]]
local_variable[type[Panel], p]
call[p.setBackground, parameter[member[SystemColor.control]]]
call[p.setLayout, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GridLayout, sub_type=None))]]
assign[member[.tSourceTable], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextField, sub_type=None))]
call[tSourceTable.setEnabled, parameter[literal[false]]]
assign[member[.tDestTable], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextField, sub_type=None))]
call[tDestTable.addActionListener, parameter[THIS[]]]
assign[member[.tDestDrop], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextField, sub_type=None))]
call[tDestDrop.addActionListener, parameter[THIS[]]]
assign[member[.tDestCreate], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextField, sub_type=None))]
call[tDestCreate.addActionListener, parameter[THIS[]]]
assign[member[.tDestDelete], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextField, sub_type=None))]
call[tDestDelete.addActionListener, parameter[THIS[]]]
assign[member[.tDestCreateIndex], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextField, sub_type=None))]
call[tDestCreateIndex.addActionListener, parameter[THIS[]]]
assign[member[.tDestDropIndex], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextField, sub_type=None))]
call[tDestDropIndex.addActionListener, parameter[THIS[]]]
assign[member[.tSourceSelect], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextField, sub_type=None))]
call[tSourceSelect.addActionListener, parameter[THIS[]]]
assign[member[.tDestInsert], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextField, sub_type=None))]
call[tDestInsert.addActionListener, parameter[THIS[]]]
assign[member[.tDestAlter], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextField, sub_type=None))]
call[tDestAlter.addActionListener, parameter[THIS[]]]
assign[member[.cTransfer], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Transfer to destination table"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Checkbox, sub_type=None))]
call[cTransfer.addItemListener, parameter[THIS[]]]
assign[member[.cDrop], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Drop destination table (ignore error)"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Checkbox, sub_type=None))]
call[cDrop.addItemListener, parameter[THIS[]]]
assign[member[.cCreate], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Create destination table"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Checkbox, sub_type=None))]
call[cCreate.addItemListener, parameter[THIS[]]]
assign[member[.cDropIndex], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Drop destination index (ignore error)"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Checkbox, sub_type=None))]
call[cDropIndex.addItemListener, parameter[THIS[]]]
assign[member[.cIdxForced], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="force Idx_ prefix for indexes names"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Checkbox, sub_type=None))]
call[cIdxForced.addItemListener, parameter[THIS[]]]
assign[member[.cCreateIndex], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Create destination index"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Checkbox, sub_type=None))]
call[cCreateIndex.addItemListener, parameter[THIS[]]]
assign[member[.cDelete], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Delete rows in destination table"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Checkbox, sub_type=None))]
call[cDelete.addItemListener, parameter[THIS[]]]
assign[member[.cInsert], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Insert into destination"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Checkbox, sub_type=None))]
call[cInsert.addItemListener, parameter[THIS[]]]
assign[member[.cFKForced], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="force FK_ prefix for foreign key names"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Checkbox, sub_type=None))]
call[cFKForced.addItemListener, parameter[THIS[]]]
assign[member[.cAlter], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Alter destination table"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Checkbox, sub_type=None))]
call[cAlter.addItemListener, parameter[THIS[]]]
call[p.add, parameter[call[.createLabel, parameter[literal["Source table"]]]]]
call[p.add, parameter[member[.tSourceTable]]]
call[p.add, parameter[member[.cTransfer]]]
call[p.add, parameter[member[.tDestTable]]]
call[p.add, parameter[member[.cDrop]]]
call[p.add, parameter[member[.tDestDrop]]]
call[p.add, parameter[member[.cCreate]]]
call[p.add, parameter[member[.tDestCreate]]]
call[p.add, parameter[member[.cDropIndex]]]
call[p.add, parameter[member[.tDestDropIndex]]]
call[p.add, parameter[member[.cCreateIndex]]]
call[p.add, parameter[member[.tDestCreateIndex]]]
call[p.add, parameter[member[.cDelete]]]
call[p.add, parameter[member[.tDestDelete]]]
call[p.add, parameter[member[.cAlter]]]
call[p.add, parameter[member[.tDestAlter]]]
call[p.add, parameter[call[.createLabel, parameter[literal["Select source records"]]]]]
call[p.add, parameter[member[.tSourceSelect]]]
call[p.add, parameter[member[.cInsert]]]
call[p.add, parameter[member[.tDestInsert]]]
call[p.add, parameter[call[.createLabel, parameter[literal[""]]]]]
call[p.add, parameter[call[.createLabel, parameter[literal[""]]]]]
call[p.add, parameter[member[.cIdxForced]]]
call[p.add, parameter[member[.cFKForced]]]
call[p.add, parameter[call[.createLabel, parameter[literal[""]]]]]
call[p.add, parameter[call[.createLabel, parameter[literal[""]]]]]
if[binary_operation[member[.iTransferMode], ==, member[.TRFM_TRANSFER]]] begin[{]
assign[member[.bStart], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Start Transfer")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Button, sub_type=None))]
assign[member[.bContinue], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Continue Transfer")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Button, sub_type=None))]
call[bContinue.setEnabled, parameter[literal[false]]]
else begin[{]
if[binary_operation[member[.iTransferMode], ==, member[Transfer.TRFM_DUMP]]] begin[{]
assign[member[.bStart], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Start Dump")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Button, sub_type=None))]
else begin[{]
if[binary_operation[member[.iTransferMode], ==, member[Transfer.TRFM_RESTORE]]] begin[{]
assign[member[.bStart], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Start Restore")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Button, sub_type=None))]
else begin[{]
None
end[}]
end[}]
end[}]
call[bStart.addActionListener, parameter[THIS[]]]
call[p.add, parameter[member[.bStart]]]
if[binary_operation[member[.iTransferMode], ==, member[.TRFM_TRANSFER]]] begin[{]
call[bContinue.addActionListener, parameter[THIS[]]]
call[p.add, parameter[member[.bContinue]]]
else begin[{]
None
end[}]
call[bStart.setEnabled, parameter[literal[false]]]
call[fMain.add, parameter[literal["Center"], call[.createBorderPanel, parameter[member[.p]]]]]
assign[member[.lTable], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10)], 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=List, sub_type=None))))]
call[lTable.addItemListener, parameter[THIS[]]]
call[fMain.add, parameter[literal["West"], call[.createBorderPanel, parameter[member[.lTable]]]]]
assign[member[.tMessage], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextField, sub_type=None))]
local_variable[type[Panel], pMessage]
call[fMain.add, parameter[literal["South"], member[.pMessage]]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[initGUI] operator[SEP] operator[SEP] {
identifier[Font] identifier[fFont] operator[=] Keyword[new] identifier[Font] operator[SEP] literal[String] , identifier[Font] operator[SEP] identifier[PLAIN] , Other[12] operator[SEP] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[BorderLayout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Panel] identifier[p] operator[=] Keyword[new] identifier[Panel] operator[SEP] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[setBackground] operator[SEP] identifier[SystemColor] operator[SEP] identifier[control] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[GridLayout] operator[SEP] Other[16] , Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[tSourceTable] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[tSourceTable] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[tDestTable] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[tDestTable] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[tDestDrop] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[tDestDrop] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[tDestCreate] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[tDestCreate] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[tDestDelete] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[tDestDelete] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[tDestCreateIndex] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[tDestCreateIndex] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[tDestDropIndex] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[tDestDropIndex] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[tSourceSelect] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[tSourceSelect] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[tDestInsert] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[tDestInsert] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[tDestAlter] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[tDestAlter] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[cTransfer] operator[=] Keyword[new] identifier[Checkbox] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[cTransfer] operator[SEP] identifier[addItemListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[cDrop] operator[=] Keyword[new] identifier[Checkbox] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[cDrop] operator[SEP] identifier[addItemListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[cCreate] operator[=] Keyword[new] identifier[Checkbox] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[cCreate] operator[SEP] identifier[addItemListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[cDropIndex] operator[=] Keyword[new] identifier[Checkbox] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[cDropIndex] operator[SEP] identifier[addItemListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[cIdxForced] operator[=] Keyword[new] identifier[Checkbox] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[cIdxForced] operator[SEP] identifier[addItemListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[cCreateIndex] operator[=] Keyword[new] identifier[Checkbox] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[cCreateIndex] operator[SEP] identifier[addItemListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[cDelete] operator[=] Keyword[new] identifier[Checkbox] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[cDelete] operator[SEP] identifier[addItemListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[cInsert] operator[=] Keyword[new] identifier[Checkbox] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[cInsert] operator[SEP] identifier[addItemListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[cFKForced] operator[=] Keyword[new] identifier[Checkbox] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[cFKForced] operator[SEP] identifier[addItemListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[cAlter] operator[=] Keyword[new] identifier[Checkbox] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[cAlter] operator[SEP] identifier[addItemListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[createLabel] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[tSourceTable] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[cTransfer] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[tDestTable] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[cDrop] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[tDestDrop] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[cCreate] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[tDestCreate] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[cDropIndex] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[tDestDropIndex] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[cCreateIndex] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[tDestCreateIndex] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[cDelete] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[tDestDelete] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[cAlter] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[tDestAlter] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[createLabel] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[tSourceSelect] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[cInsert] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[tDestInsert] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[createLabel] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[createLabel] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[cIdxForced] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[cFKForced] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[createLabel] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[createLabel] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[iTransferMode] operator[==] identifier[TRFM_TRANSFER] operator[SEP] {
identifier[bStart] operator[=] Keyword[new] identifier[Button] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[bContinue] operator[=] Keyword[new] identifier[Button] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[bContinue] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[iTransferMode] operator[==] identifier[Transfer] operator[SEP] identifier[TRFM_DUMP] operator[SEP] {
identifier[bStart] operator[=] Keyword[new] identifier[Button] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[iTransferMode] operator[==] identifier[Transfer] operator[SEP] identifier[TRFM_RESTORE] operator[SEP] {
identifier[bStart] operator[=] Keyword[new] identifier[Button] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
identifier[bStart] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[bStart] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[iTransferMode] operator[==] identifier[TRFM_TRANSFER] operator[SEP] {
identifier[bContinue] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[add] operator[SEP] identifier[bContinue] operator[SEP] operator[SEP]
}
identifier[bStart] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[fMain] operator[SEP] identifier[add] operator[SEP] literal[String] , identifier[createBorderPanel] operator[SEP] identifier[p] operator[SEP] operator[SEP] operator[SEP] identifier[lTable] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[List] operator[SEP] Other[10] operator[SEP] operator[SEP] identifier[lTable] operator[SEP] identifier[addItemListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[fMain] operator[SEP] identifier[add] operator[SEP] literal[String] , identifier[createBorderPanel] operator[SEP] identifier[lTable] operator[SEP] operator[SEP] operator[SEP] identifier[tMessage] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[Panel] identifier[pMessage] operator[=] identifier[createBorderPanel] operator[SEP] identifier[tMessage] operator[SEP] operator[SEP] identifier[fMain] operator[SEP] identifier[add] operator[SEP] literal[String] , identifier[pMessage] operator[SEP] operator[SEP]
}
|
public static void writeCSV(DataObjectModel model, Collection<? extends DataObject> collection, OutputStream os) throws IOException
{
BufferedOutputStream bos = new BufferedOutputStream(os);
OutputStreamWriter osw = new OutputStreamWriter(bos, "ISO-8859-1");
CSVWriter writer = new CSVWriter(osw, ',', '"', "\r\n");
String[] line = model.getProperties();
writer.writeNext(line);
for (DataObject dob : collection)
{
int index = 0;
for (String property : model.getPropertyList())
{
Object value = dob.get(property);
if (value != null)
{
line[index++] = value.toString();
}
else
{
line[index++] = "";
}
}
writer.writeNext(line);
}
writer.flush();
} | class class_name[name] begin[{]
method[writeCSV, return_type[void], modifier[public static], parameter[model, collection, os]] begin[{]
local_variable[type[BufferedOutputStream], bos]
local_variable[type[OutputStreamWriter], osw]
local_variable[type[CSVWriter], writer]
local_variable[type[String], line]
call[writer.writeNext, parameter[member[.line]]]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=index)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=dob, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None)), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getPropertyList, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=property)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeNext, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=collection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dob)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DataObject, sub_type=None))), label=None)
call[writer.flush, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[writeCSV] operator[SEP] identifier[DataObjectModel] identifier[model] , identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[DataObject] operator[>] identifier[collection] , identifier[OutputStream] identifier[os] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[BufferedOutputStream] identifier[bos] operator[=] Keyword[new] identifier[BufferedOutputStream] operator[SEP] identifier[os] operator[SEP] operator[SEP] identifier[OutputStreamWriter] identifier[osw] operator[=] Keyword[new] identifier[OutputStreamWriter] operator[SEP] identifier[bos] , literal[String] operator[SEP] operator[SEP] identifier[CSVWriter] identifier[writer] operator[=] Keyword[new] identifier[CSVWriter] operator[SEP] identifier[osw] , literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[line] operator[=] identifier[model] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[writeNext] operator[SEP] identifier[line] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[DataObject] identifier[dob] operator[:] identifier[collection] operator[SEP] {
Keyword[int] identifier[index] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[property] operator[:] identifier[model] operator[SEP] identifier[getPropertyList] operator[SEP] operator[SEP] operator[SEP] {
identifier[Object] identifier[value] operator[=] identifier[dob] operator[SEP] identifier[get] operator[SEP] identifier[property] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] {
identifier[line] operator[SEP] identifier[index] operator[++] operator[SEP] operator[=] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[line] operator[SEP] identifier[index] operator[++] operator[SEP] operator[=] literal[String] operator[SEP]
}
}
identifier[writer] operator[SEP] identifier[writeNext] operator[SEP] identifier[line] operator[SEP] operator[SEP]
}
identifier[writer] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP]
}
|
private void handleScriptField(MethodField method) throws SqlParseException {
List<KVValue> params = method.getParams();
if (params.size() == 2) {
String f = params.get(0).value.toString();
fieldNames.add(f);
request.addScriptField(f, new Script(params.get(1).value.toString()));
} else if (params.size() == 3) {
String f = params.get(0).value.toString();
fieldNames.add(f);
request.addScriptField(f,
new Script(
ScriptType.INLINE,
params.get(1).value.toString(),
params.get(2).value.toString(),
Collections.emptyMap()
)
);
} else {
throw new SqlParseException("scripted_field only allows script(name,script) or script(name,lang,script)");
}
} | class class_name[name] begin[{]
method[handleScriptField, return_type[void], modifier[private], parameter[method]] begin[{]
local_variable[type[List], params]
if[binary_operation[call[params.size, parameter[]], ==, literal[2]]] begin[{]
local_variable[type[String], f]
call[fieldNames.add, parameter[member[.f]]]
call[request.addScriptField, parameter[member[.f], ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=get, postfix_operators=[], prefix_operators=[], qualifier=params, selectors=[MemberReference(member=value, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Script, sub_type=None))]]
else begin[{]
if[binary_operation[call[params.size, parameter[]], ==, literal[3]]] begin[{]
local_variable[type[String], f]
call[fieldNames.add, parameter[member[.f]]]
call[request.addScriptField, parameter[member[.f], ClassCreator(arguments=[MemberReference(member=INLINE, postfix_operators=[], prefix_operators=[], qualifier=ScriptType, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=get, postfix_operators=[], prefix_operators=[], qualifier=params, selectors=[MemberReference(member=value, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=get, postfix_operators=[], prefix_operators=[], qualifier=params, selectors=[MemberReference(member=value, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=emptyMap, 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=Script, sub_type=None))]]
else begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="scripted_field only allows script(name,script) or script(name,lang,script)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SqlParseException, sub_type=None)), label=None)
end[}]
end[}]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[handleScriptField] operator[SEP] identifier[MethodField] identifier[method] operator[SEP] Keyword[throws] identifier[SqlParseException] {
identifier[List] operator[<] identifier[KVValue] operator[>] identifier[params] operator[=] identifier[method] operator[SEP] identifier[getParams] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[params] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[2] operator[SEP] {
identifier[String] identifier[f] operator[=] identifier[params] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[fieldNames] operator[SEP] identifier[add] operator[SEP] identifier[f] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[addScriptField] operator[SEP] identifier[f] , Keyword[new] identifier[Script] operator[SEP] identifier[params] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[params] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[3] operator[SEP] {
identifier[String] identifier[f] operator[=] identifier[params] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[fieldNames] operator[SEP] identifier[add] operator[SEP] identifier[f] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[addScriptField] operator[SEP] identifier[f] , Keyword[new] identifier[Script] operator[SEP] identifier[ScriptType] operator[SEP] identifier[INLINE] , identifier[params] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[params] operator[SEP] identifier[get] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[Collections] operator[SEP] identifier[emptyMap] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[throw] Keyword[new] identifier[SqlParseException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
}
|
@GwtIncompatible
public static PathSubject assertThat(@NullableDecl Path target) {
return assertAbout(PathSubject.paths()).that(target);
} | class class_name[name] begin[{]
method[assertThat, return_type[type[PathSubject]], modifier[public static], parameter[target]] begin[{]
return[call[.assertAbout, parameter[call[PathSubject.paths, parameter[]]]]]
end[}]
END[}] | annotation[@] identifier[GwtIncompatible] Keyword[public] Keyword[static] identifier[PathSubject] identifier[assertThat] operator[SEP] annotation[@] identifier[NullableDecl] identifier[Path] identifier[target] operator[SEP] {
Keyword[return] identifier[assertAbout] operator[SEP] identifier[PathSubject] operator[SEP] identifier[paths] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[that] operator[SEP] identifier[target] operator[SEP] operator[SEP]
}
|
public static vpnclientlessaccesspolicy[] get(nitro_service service) throws Exception{
vpnclientlessaccesspolicy obj = new vpnclientlessaccesspolicy();
vpnclientlessaccesspolicy[] response = (vpnclientlessaccesspolicy[])obj.get_resources(service);
return response;
} | class class_name[name] begin[{]
method[get, return_type[type[vpnclientlessaccesspolicy]], modifier[public static], parameter[service]] begin[{]
local_variable[type[vpnclientlessaccesspolicy], obj]
local_variable[type[vpnclientlessaccesspolicy], response]
return[member[.response]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[vpnclientlessaccesspolicy] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[vpnclientlessaccesspolicy] identifier[obj] operator[=] Keyword[new] identifier[vpnclientlessaccesspolicy] operator[SEP] operator[SEP] operator[SEP] identifier[vpnclientlessaccesspolicy] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[vpnclientlessaccesspolicy] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[get_resources] operator[SEP] identifier[service] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP]
}
|
public Future<RankedStats> getRankedStats(long summoner, Season season) {
return new ApiFuture<>(() -> handler.getRankedStats(summoner, season));
} | class class_name[name] begin[{]
method[getRankedStats, return_type[type[Future]], modifier[public], parameter[summoner, season]] begin[{]
return[ClassCreator(arguments=[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=summoner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=season, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRankedStats, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), parameters=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ApiFuture, sub_type=None))]
end[}]
END[}] | Keyword[public] identifier[Future] operator[<] identifier[RankedStats] operator[>] identifier[getRankedStats] operator[SEP] Keyword[long] identifier[summoner] , identifier[Season] identifier[season] operator[SEP] {
Keyword[return] Keyword[new] identifier[ApiFuture] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[->] identifier[handler] operator[SEP] identifier[getRankedStats] operator[SEP] identifier[summoner] , identifier[season] operator[SEP] operator[SEP] operator[SEP]
}
|
void addModuleResource(String moduleResource) {
CmsModuleResourceSelectField resField = createModuleResourceField(moduleResource);
if (resField != null) {
m_moduleResourcesGroup.addRow(resField);
}
} | class class_name[name] begin[{]
method[addModuleResource, return_type[void], modifier[default], parameter[moduleResource]] begin[{]
local_variable[type[CmsModuleResourceSelectField], resField]
if[binary_operation[member[.resField], !=, literal[null]]] begin[{]
call[m_moduleResourcesGroup.addRow, parameter[member[.resField]]]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[void] identifier[addModuleResource] operator[SEP] identifier[String] identifier[moduleResource] operator[SEP] {
identifier[CmsModuleResourceSelectField] identifier[resField] operator[=] identifier[createModuleResourceField] operator[SEP] identifier[moduleResource] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resField] operator[!=] Other[null] operator[SEP] {
identifier[m_moduleResourcesGroup] operator[SEP] identifier[addRow] operator[SEP] identifier[resField] operator[SEP] operator[SEP]
}
}
|
public static void copyFromBytes(
MemorySegment[] segments, int offset,
byte[] bytes, int bytesOffset, int numBytes) {
if (segments.length == 1) {
segments[0].put(offset, bytes, bytesOffset, numBytes);
} else {
copyMultiSegmentsFromBytes(segments, offset, bytes, bytesOffset, numBytes);
}
} | class class_name[name] begin[{]
method[copyFromBytes, return_type[void], modifier[public static], parameter[segments, offset, bytes, bytesOffset, numBytes]] begin[{]
if[binary_operation[member[segments.length], ==, literal[1]]] begin[{]
member[.segments]
else begin[{]
call[.copyMultiSegmentsFromBytes, parameter[member[.segments], member[.offset], member[.bytes], member[.bytesOffset], member[.numBytes]]]
end[}]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[copyFromBytes] operator[SEP] identifier[MemorySegment] operator[SEP] operator[SEP] identifier[segments] , Keyword[int] identifier[offset] , Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] , Keyword[int] identifier[bytesOffset] , Keyword[int] identifier[numBytes] operator[SEP] {
Keyword[if] operator[SEP] identifier[segments] operator[SEP] identifier[length] operator[==] Other[1] operator[SEP] {
identifier[segments] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[offset] , identifier[bytes] , identifier[bytesOffset] , identifier[numBytes] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[copyMultiSegmentsFromBytes] operator[SEP] identifier[segments] , identifier[offset] , identifier[bytes] , identifier[bytesOffset] , identifier[numBytes] operator[SEP] operator[SEP]
}
}
|
@java.lang.Deprecated
public java.util.Map<java.lang.String, io.grafeas.v1beta1.provenance.FileHashes> getFileHashes() {
return getFileHashesMap();
} | class class_name[name] begin[{]
method[getFileHashes, return_type[type[java]], modifier[public], parameter[]] begin[{]
return[call[.getFileHashesMap, parameter[]]]
end[}]
END[}] | annotation[@] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Deprecated] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] , identifier[io] operator[SEP] identifier[grafeas] operator[SEP] identifier[v1beta1] operator[SEP] identifier[provenance] operator[SEP] identifier[FileHashes] operator[>] identifier[getFileHashes] operator[SEP] operator[SEP] {
Keyword[return] identifier[getFileHashesMap] operator[SEP] operator[SEP] operator[SEP]
}
|
@CheckReturnValue
@NonNull
@BackpressureSupport(BackpressureKind.ERROR)
@SchedulerSupport(SchedulerSupport.NONE)
public final <U> Flowable<T> sample(Publisher<U> sampler) {
ObjectHelper.requireNonNull(sampler, "sampler is null");
return RxJavaPlugins.onAssembly(new FlowableSamplePublisher<T>(this, sampler, false));
} | class class_name[name] begin[{]
method[sample, return_type[type[Flowable]], modifier[final public], parameter[sampler]] begin[{]
call[ObjectHelper.requireNonNull, parameter[member[.sampler], literal["sampler is null"]]]
return[call[RxJavaPlugins.onAssembly, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=sampler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=FlowableSamplePublisher, sub_type=None))]]]
end[}]
END[}] | annotation[@] identifier[CheckReturnValue] annotation[@] identifier[NonNull] annotation[@] identifier[BackpressureSupport] operator[SEP] identifier[BackpressureKind] operator[SEP] identifier[ERROR] operator[SEP] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[final] operator[<] identifier[U] operator[>] identifier[Flowable] operator[<] identifier[T] operator[>] identifier[sample] operator[SEP] identifier[Publisher] operator[<] identifier[U] operator[>] identifier[sampler] operator[SEP] {
identifier[ObjectHelper] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[sampler] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[RxJavaPlugins] operator[SEP] identifier[onAssembly] operator[SEP] Keyword[new] identifier[FlowableSamplePublisher] operator[<] identifier[T] operator[>] operator[SEP] Keyword[this] , identifier[sampler] , literal[boolean] operator[SEP] operator[SEP] operator[SEP]
}
|
public String attr(String attributeKey) {
Validate.notNull(attributeKey);
if (!hasAttributes())
return EmptyString;
String val = attributes().getIgnoreCase(attributeKey);
if (val.length() > 0)
return val;
else if (attributeKey.startsWith("abs:"))
return absUrl(attributeKey.substring("abs:".length()));
else return "";
} | class class_name[name] begin[{]
method[attr, return_type[type[String]], modifier[public], parameter[attributeKey]] begin[{]
call[Validate.notNull, parameter[member[.attributeKey]]]
if[call[.hasAttributes, parameter[]]] begin[{]
return[member[.EmptyString]]
else begin[{]
None
end[}]
local_variable[type[String], val]
if[binary_operation[call[val.length, parameter[]], >, literal[0]]] begin[{]
return[member[.val]]
else begin[{]
if[call[attributeKey.startsWith, parameter[literal["abs:"]]]] begin[{]
return[call[.absUrl, parameter[call[attributeKey.substring, parameter[literal["abs:"]]]]]]
else begin[{]
return[literal[""]]
end[}]
end[}]
end[}]
END[}] | Keyword[public] identifier[String] identifier[attr] operator[SEP] identifier[String] identifier[attributeKey] operator[SEP] {
identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[attributeKey] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[hasAttributes] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[EmptyString] operator[SEP] identifier[String] identifier[val] operator[=] identifier[attributes] operator[SEP] operator[SEP] operator[SEP] identifier[getIgnoreCase] operator[SEP] identifier[attributeKey] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[val] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] Keyword[return] identifier[val] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[attributeKey] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[absUrl] operator[SEP] identifier[attributeKey] operator[SEP] identifier[substring] operator[SEP] literal[String] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[return] literal[String] operator[SEP]
}
|
public static Bitmap clipCircle(@NonNull final Bitmap bitmap, final int size) {
Bitmap squareBitmap = clipSquare(bitmap, size);
int squareSize = squareBitmap.getWidth();
float radius = (float) squareSize / 2.0f;
Bitmap clippedBitmap = Bitmap.createBitmap(squareSize, squareSize, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(clippedBitmap);
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setColor(Color.BLACK);
canvas.drawCircle(radius, radius, radius, paint);
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
canvas.drawBitmap(squareBitmap, new Rect(0, 0, squareSize, squareSize),
new Rect(0, 0, squareSize, squareSize), paint);
return clippedBitmap;
} | class class_name[name] begin[{]
method[clipCircle, return_type[type[Bitmap]], modifier[public static], parameter[bitmap, size]] begin[{]
local_variable[type[Bitmap], squareBitmap]
local_variable[type[int], squareSize]
local_variable[type[float], radius]
local_variable[type[Bitmap], clippedBitmap]
local_variable[type[Canvas], canvas]
local_variable[type[Paint], paint]
call[paint.setAntiAlias, parameter[literal[true]]]
call[paint.setColor, parameter[member[Color.BLACK]]]
call[canvas.drawCircle, parameter[member[.radius], member[.radius], member[.radius], member[.paint]]]
call[paint.setXfermode, parameter[ClassCreator(arguments=[MemberReference(member=SRC_IN, postfix_operators=[], prefix_operators=[], qualifier=PorterDuff.Mode, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PorterDuffXfermode, sub_type=None))]]
call[canvas.drawBitmap, parameter[member[.squareBitmap], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=squareSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=squareSize, 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=Rect, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=squareSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=squareSize, 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=Rect, sub_type=None)), member[.paint]]]
return[member[.clippedBitmap]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Bitmap] identifier[clipCircle] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Bitmap] identifier[bitmap] , Keyword[final] Keyword[int] identifier[size] operator[SEP] {
identifier[Bitmap] identifier[squareBitmap] operator[=] identifier[clipSquare] operator[SEP] identifier[bitmap] , identifier[size] operator[SEP] operator[SEP] Keyword[int] identifier[squareSize] operator[=] identifier[squareBitmap] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[radius] operator[=] operator[SEP] Keyword[float] operator[SEP] identifier[squareSize] operator[/] literal[Float] operator[SEP] identifier[Bitmap] identifier[clippedBitmap] operator[=] identifier[Bitmap] operator[SEP] identifier[createBitmap] operator[SEP] identifier[squareSize] , identifier[squareSize] , identifier[Bitmap] operator[SEP] identifier[Config] operator[SEP] identifier[ARGB_8888] operator[SEP] operator[SEP] identifier[Canvas] identifier[canvas] operator[=] Keyword[new] identifier[Canvas] operator[SEP] identifier[clippedBitmap] operator[SEP] operator[SEP] identifier[Paint] identifier[paint] operator[=] Keyword[new] identifier[Paint] operator[SEP] operator[SEP] operator[SEP] identifier[paint] operator[SEP] identifier[setAntiAlias] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[paint] operator[SEP] identifier[setColor] operator[SEP] identifier[Color] operator[SEP] identifier[BLACK] operator[SEP] operator[SEP] identifier[canvas] operator[SEP] identifier[drawCircle] operator[SEP] identifier[radius] , identifier[radius] , identifier[radius] , identifier[paint] operator[SEP] operator[SEP] identifier[paint] operator[SEP] identifier[setXfermode] operator[SEP] Keyword[new] identifier[PorterDuffXfermode] operator[SEP] identifier[PorterDuff] operator[SEP] identifier[Mode] operator[SEP] identifier[SRC_IN] operator[SEP] operator[SEP] operator[SEP] identifier[canvas] operator[SEP] identifier[drawBitmap] operator[SEP] identifier[squareBitmap] , Keyword[new] identifier[Rect] operator[SEP] Other[0] , Other[0] , identifier[squareSize] , identifier[squareSize] operator[SEP] , Keyword[new] identifier[Rect] operator[SEP] Other[0] , Other[0] , identifier[squareSize] , identifier[squareSize] operator[SEP] , identifier[paint] operator[SEP] operator[SEP] Keyword[return] identifier[clippedBitmap] operator[SEP]
}
|
public boolean unprotectDocument(String pwd) {
boolean result = false;
if (this.protectionHash.equals(RtfProtection.generateHash(pwd))) {
this.protectionLevel = RtfProtection.LEVEL_NONE;
this.protectionHash = null;
result = true;
}
return result;
} | class class_name[name] begin[{]
method[unprotectDocument, return_type[type[boolean]], modifier[public], parameter[pwd]] begin[{]
local_variable[type[boolean], result]
if[THIS[member[None.protectionHash]call[None.equals, parameter[call[RtfProtection.generateHash, parameter[member[.pwd]]]]]]] begin[{]
assign[THIS[member[None.protectionLevel]], member[RtfProtection.LEVEL_NONE]]
assign[THIS[member[None.protectionHash]], literal[null]]
assign[member[.result], literal[true]]
else begin[{]
None
end[}]
return[member[.result]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[unprotectDocument] operator[SEP] identifier[String] identifier[pwd] operator[SEP] {
Keyword[boolean] identifier[result] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[protectionHash] operator[SEP] identifier[equals] operator[SEP] identifier[RtfProtection] operator[SEP] identifier[generateHash] operator[SEP] identifier[pwd] operator[SEP] operator[SEP] operator[SEP] {
Keyword[this] operator[SEP] identifier[protectionLevel] operator[=] identifier[RtfProtection] operator[SEP] identifier[LEVEL_NONE] operator[SEP] Keyword[this] operator[SEP] identifier[protectionHash] operator[=] Other[null] operator[SEP] identifier[result] operator[=] literal[boolean] operator[SEP]
}
Keyword[return] identifier[result] operator[SEP]
}
|
@Override
protected void processConditions(final BuildData buildData, final SpecTopic specTopic, final Document doc) {
if (buildData.getContentSpec().getPublicanCfg() == null || !buildData.getContentSpec().getPublicanCfg().contains("condition:")) {
super.processConditions(buildData, specTopic, doc);
}
} | class class_name[name] begin[{]
method[processConditions, return_type[void], modifier[protected], parameter[buildData, specTopic, doc]] begin[{]
if[binary_operation[binary_operation[call[buildData.getContentSpec, parameter[]], ==, literal[null]], ||, call[buildData.getContentSpec, parameter[]]]] begin[{]
SuperMethodInvocation(arguments=[MemberReference(member=buildData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=specTopic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processConditions, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
else begin[{]
None
end[}]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[processConditions] operator[SEP] Keyword[final] identifier[BuildData] identifier[buildData] , Keyword[final] identifier[SpecTopic] identifier[specTopic] , Keyword[final] identifier[Document] identifier[doc] operator[SEP] {
Keyword[if] operator[SEP] identifier[buildData] operator[SEP] identifier[getContentSpec] operator[SEP] operator[SEP] operator[SEP] identifier[getPublicanCfg] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] operator[!] identifier[buildData] operator[SEP] identifier[getContentSpec] operator[SEP] operator[SEP] operator[SEP] identifier[getPublicanCfg] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] {
Keyword[super] operator[SEP] identifier[processConditions] operator[SEP] identifier[buildData] , identifier[specTopic] , identifier[doc] operator[SEP] operator[SEP]
}
}
|
@Override
public CancelRetrievalResult cancelRetrieval(CancelRetrievalRequest request) {
request = beforeClientExecution(request);
return executeCancelRetrieval(request);
} | class class_name[name] begin[{]
method[cancelRetrieval, return_type[type[CancelRetrievalResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeCancelRetrieval, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[CancelRetrievalResult] identifier[cancelRetrieval] operator[SEP] identifier[CancelRetrievalRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeCancelRetrieval] operator[SEP] identifier[request] operator[SEP] operator[SEP]
}
|
public int getCalculatedStyle() {
int style = this.style;
if (style == UNDEFINED) {
style = NORMAL;
}
if (baseFont != null)
return style;
if (family == SYMBOL || family == ZAPFDINGBATS)
return style;
else
return style & (~BOLDITALIC);
} | class class_name[name] begin[{]
method[getCalculatedStyle, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], style]
if[binary_operation[member[.style], ==, member[.UNDEFINED]]] begin[{]
assign[member[.style], member[.NORMAL]]
else begin[{]
None
end[}]
if[binary_operation[member[.baseFont], !=, literal[null]]] begin[{]
return[member[.style]]
else begin[{]
None
end[}]
if[binary_operation[binary_operation[member[.family], ==, member[.SYMBOL]], ||, binary_operation[member[.family], ==, member[.ZAPFDINGBATS]]]] begin[{]
return[member[.style]]
else begin[{]
return[binary_operation[member[.style], &, member[.BOLDITALIC]]]
end[}]
end[}]
END[}] | Keyword[public] Keyword[int] identifier[getCalculatedStyle] operator[SEP] operator[SEP] {
Keyword[int] identifier[style] operator[=] Keyword[this] operator[SEP] identifier[style] operator[SEP] Keyword[if] operator[SEP] identifier[style] operator[==] identifier[UNDEFINED] operator[SEP] {
identifier[style] operator[=] identifier[NORMAL] operator[SEP]
}
Keyword[if] operator[SEP] identifier[baseFont] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[style] operator[SEP] Keyword[if] operator[SEP] identifier[family] operator[==] identifier[SYMBOL] operator[||] identifier[family] operator[==] identifier[ZAPFDINGBATS] operator[SEP] Keyword[return] identifier[style] operator[SEP] Keyword[else] Keyword[return] identifier[style] operator[&] operator[SEP] operator[~] identifier[BOLDITALIC] operator[SEP] operator[SEP]
}
|
public final ParallelFlux<T> doOnComplete(Runnable onComplete) {
Objects.requireNonNull(onComplete, "onComplete");
return doOnSignal(this, null, null, null, onComplete, null, null, null, null);
} | class class_name[name] begin[{]
method[doOnComplete, return_type[type[ParallelFlux]], modifier[final public], parameter[onComplete]] begin[{]
call[Objects.requireNonNull, parameter[member[.onComplete], literal["onComplete"]]]
return[call[.doOnSignal, parameter[THIS[], literal[null], literal[null], literal[null], member[.onComplete], literal[null], literal[null], literal[null], literal[null]]]]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[ParallelFlux] operator[<] identifier[T] operator[>] identifier[doOnComplete] operator[SEP] identifier[Runnable] identifier[onComplete] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[onComplete] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[doOnSignal] operator[SEP] Keyword[this] , Other[null] , Other[null] , Other[null] , identifier[onComplete] , Other[null] , Other[null] , Other[null] , Other[null] operator[SEP] operator[SEP]
}
|
@Override
public EClass getIfcSanitaryTerminalType() {
if (ifcSanitaryTerminalTypeEClass == null) {
ifcSanitaryTerminalTypeEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(585);
}
return ifcSanitaryTerminalTypeEClass;
} | class class_name[name] begin[{]
method[getIfcSanitaryTerminalType, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcSanitaryTerminalTypeEClass], ==, literal[null]]] begin[{]
assign[member[.ifcSanitaryTerminalTypeEClass], 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=585)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))]
else begin[{]
None
end[}]
return[member[.ifcSanitaryTerminalTypeEClass]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcSanitaryTerminalType] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcSanitaryTerminalTypeEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcSanitaryTerminalTypeEClass] operator[=] operator[SEP] identifier[EClass] 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[585] operator[SEP] operator[SEP]
}
Keyword[return] identifier[ifcSanitaryTerminalTypeEClass] operator[SEP]
}
|
public static void verifyCondition(@Nullable ErrorCollector errorCollector, @Nullable ValueRecorder recorder,
@Nullable String text, int line, int column, @Nullable Object message, @Nullable Object condition) {
if (!GroovyRuntimeUtil.isTruthy(condition)) {
final ConditionNotSatisfiedError conditionNotSatisfiedError = new ConditionNotSatisfiedError(
new Condition(getValues(recorder), text, TextPosition.create(line, column), messageToString(message), null, null));
errorCollector.collectOrThrow(conditionNotSatisfiedError);
}
} | class class_name[name] begin[{]
method[verifyCondition, return_type[void], modifier[public static], parameter[errorCollector, recorder, text, line, column, message, condition]] begin[{]
if[call[GroovyRuntimeUtil.isTruthy, parameter[member[.condition]]]] begin[{]
local_variable[type[ConditionNotSatisfiedError], conditionNotSatisfiedError]
call[errorCollector.collectOrThrow, parameter[member[.conditionNotSatisfiedError]]]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[verifyCondition] operator[SEP] annotation[@] identifier[Nullable] identifier[ErrorCollector] identifier[errorCollector] , annotation[@] identifier[Nullable] identifier[ValueRecorder] identifier[recorder] , annotation[@] identifier[Nullable] identifier[String] identifier[text] , Keyword[int] identifier[line] , Keyword[int] identifier[column] , annotation[@] identifier[Nullable] identifier[Object] identifier[message] , annotation[@] identifier[Nullable] identifier[Object] identifier[condition] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[GroovyRuntimeUtil] operator[SEP] identifier[isTruthy] operator[SEP] identifier[condition] operator[SEP] operator[SEP] {
Keyword[final] identifier[ConditionNotSatisfiedError] identifier[conditionNotSatisfiedError] operator[=] Keyword[new] identifier[ConditionNotSatisfiedError] operator[SEP] Keyword[new] identifier[Condition] operator[SEP] identifier[getValues] operator[SEP] identifier[recorder] operator[SEP] , identifier[text] , identifier[TextPosition] operator[SEP] identifier[create] operator[SEP] identifier[line] , identifier[column] operator[SEP] , identifier[messageToString] operator[SEP] identifier[message] operator[SEP] , Other[null] , Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[errorCollector] operator[SEP] identifier[collectOrThrow] operator[SEP] identifier[conditionNotSatisfiedError] operator[SEP] operator[SEP]
}
}
|
public static String getBodyFromApptentivePush(Bundle bundle) {
try {
if (!ApptentiveInternal.checkRegistered()) {
return null;
}
if (bundle == null) {
return null;
}
if (bundle.containsKey(ApptentiveInternal.BODY_DEFAULT)) {
return bundle.getString(ApptentiveInternal.BODY_DEFAULT);
}
if (bundle.containsKey(ApptentiveInternal.PUSH_EXTRA_KEY_PARSE)) {
String parseDataString = bundle.getString(ApptentiveInternal.PUSH_EXTRA_KEY_PARSE);
if (parseDataString != null) {
try {
JSONObject parseJson = new JSONObject(parseDataString);
return parseJson.optString(ApptentiveInternal.BODY_PARSE, null);
} catch (JSONException e) {
logException(e);
return null;
}
}
} else if (bundle.containsKey(ApptentiveInternal.PUSH_EXTRA_KEY_UA)) {
Bundle uaPushBundle = bundle.getBundle(ApptentiveInternal.PUSH_EXTRA_KEY_UA);
if (uaPushBundle == null) {
return null;
}
return uaPushBundle.getString(ApptentiveInternal.BODY_UA);
} else if (bundle.containsKey(ApptentiveInternal.BODY_UA)) {
return bundle.getString(ApptentiveInternal.BODY_UA);
}
} catch (Exception e) {
ApptentiveLog.e(PUSH, e, "Exception while getting body from Apptentive push");
logException(e);
}
return null;
} | class class_name[name] begin[{]
method[getBodyFromApptentivePush, return_type[type[String]], modifier[public static], parameter[bundle]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=checkRegistered, postfix_operators=[], prefix_operators=['!'], qualifier=ApptentiveInternal, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=bundle, 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=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=BODY_DEFAULT, postfix_operators=[], prefix_operators=[], qualifier=ApptentiveInternal, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=BODY_DEFAULT, postfix_operators=[], prefix_operators=[], qualifier=ApptentiveInternal, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=PUSH_EXTRA_KEY_PARSE, postfix_operators=[], prefix_operators=[], qualifier=ApptentiveInternal, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=PUSH_EXTRA_KEY_UA, postfix_operators=[], prefix_operators=[], qualifier=ApptentiveInternal, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=BODY_UA, postfix_operators=[], prefix_operators=[], qualifier=ApptentiveInternal, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=BODY_UA, postfix_operators=[], prefix_operators=[], qualifier=ApptentiveInternal, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=PUSH_EXTRA_KEY_UA, postfix_operators=[], prefix_operators=[], qualifier=ApptentiveInternal, selectors=[])], member=getBundle, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None), name=uaPushBundle)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Bundle, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=uaPushBundle, 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=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=BODY_UA, postfix_operators=[], prefix_operators=[], qualifier=ApptentiveInternal, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=uaPushBundle, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=PUSH_EXTRA_KEY_PARSE, postfix_operators=[], prefix_operators=[], qualifier=ApptentiveInternal, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None), name=parseDataString)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=parseDataString, 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=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=parseDataString, 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=JSONObject, sub_type=None)), name=parseJson)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JSONObject, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=BODY_PARSE, postfix_operators=[], prefix_operators=[], qualifier=ApptentiveInternal, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=optString, postfix_operators=[], prefix_operators=[], qualifier=parseJson, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=logException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JSONException']))], finally_block=None, label=None, resources=None)]))]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=PUSH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception while getting body from Apptentive push")], member=e, postfix_operators=[], prefix_operators=[], qualifier=ApptentiveLog, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=logException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)
return[literal[null]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[getBodyFromApptentivePush] operator[SEP] identifier[Bundle] identifier[bundle] operator[SEP] {
Keyword[try] {
Keyword[if] operator[SEP] operator[!] identifier[ApptentiveInternal] operator[SEP] identifier[checkRegistered] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyword[if] operator[SEP] identifier[bundle] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyword[if] operator[SEP] identifier[bundle] operator[SEP] identifier[containsKey] operator[SEP] identifier[ApptentiveInternal] operator[SEP] identifier[BODY_DEFAULT] operator[SEP] operator[SEP] {
Keyword[return] identifier[bundle] operator[SEP] identifier[getString] operator[SEP] identifier[ApptentiveInternal] operator[SEP] identifier[BODY_DEFAULT] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[bundle] operator[SEP] identifier[containsKey] operator[SEP] identifier[ApptentiveInternal] operator[SEP] identifier[PUSH_EXTRA_KEY_PARSE] operator[SEP] operator[SEP] {
identifier[String] identifier[parseDataString] operator[=] identifier[bundle] operator[SEP] identifier[getString] operator[SEP] identifier[ApptentiveInternal] operator[SEP] identifier[PUSH_EXTRA_KEY_PARSE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parseDataString] operator[!=] Other[null] operator[SEP] {
Keyword[try] {
identifier[JSONObject] identifier[parseJson] operator[=] Keyword[new] identifier[JSONObject] operator[SEP] identifier[parseDataString] operator[SEP] operator[SEP] Keyword[return] identifier[parseJson] operator[SEP] identifier[optString] operator[SEP] identifier[ApptentiveInternal] operator[SEP] identifier[BODY_PARSE] , Other[null] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[JSONException] identifier[e] operator[SEP] {
identifier[logException] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP]
}
}
}
Keyword[else] Keyword[if] operator[SEP] identifier[bundle] operator[SEP] identifier[containsKey] operator[SEP] identifier[ApptentiveInternal] operator[SEP] identifier[PUSH_EXTRA_KEY_UA] operator[SEP] operator[SEP] {
identifier[Bundle] identifier[uaPushBundle] operator[=] identifier[bundle] operator[SEP] identifier[getBundle] operator[SEP] identifier[ApptentiveInternal] operator[SEP] identifier[PUSH_EXTRA_KEY_UA] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[uaPushBundle] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyword[return] identifier[uaPushBundle] operator[SEP] identifier[getString] operator[SEP] identifier[ApptentiveInternal] operator[SEP] identifier[BODY_UA] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[bundle] operator[SEP] identifier[containsKey] operator[SEP] identifier[ApptentiveInternal] operator[SEP] identifier[BODY_UA] operator[SEP] operator[SEP] {
Keyword[return] identifier[bundle] operator[SEP] identifier[getString] operator[SEP] identifier[ApptentiveInternal] operator[SEP] identifier[BODY_UA] operator[SEP] operator[SEP]
}
}
Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] {
identifier[ApptentiveLog] operator[SEP] identifier[e] operator[SEP] identifier[PUSH] , identifier[e] , literal[String] operator[SEP] operator[SEP] identifier[logException] operator[SEP] identifier[e] operator[SEP] operator[SEP]
}
Keyword[return] Other[null] operator[SEP]
}
|
public static Object sim( String file, String ll, String cmd ) throws Exception {
String f = CLI.readFile(file);
Object o = CLI.createSim(f, false, ll);
return CLI.invoke(o, cmd);
} | class class_name[name] begin[{]
method[sim, return_type[type[Object]], modifier[public static], parameter[file, ll, cmd]] begin[{]
local_variable[type[String], f]
local_variable[type[Object], o]
return[call[CLI.invoke, parameter[member[.o], member[.cmd]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Object] identifier[sim] operator[SEP] identifier[String] identifier[file] , identifier[String] identifier[ll] , identifier[String] identifier[cmd] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[f] operator[=] identifier[CLI] operator[SEP] identifier[readFile] operator[SEP] identifier[file] operator[SEP] operator[SEP] identifier[Object] identifier[o] operator[=] identifier[CLI] operator[SEP] identifier[createSim] operator[SEP] identifier[f] , literal[boolean] , identifier[ll] operator[SEP] operator[SEP] Keyword[return] identifier[CLI] operator[SEP] identifier[invoke] operator[SEP] identifier[o] , identifier[cmd] operator[SEP] operator[SEP]
}
|
public Observable<Void> beginDownloadUpdatesAsync(String deviceName, String resourceGroupName) {
return beginDownloadUpdatesWithServiceResponseAsync(deviceName, resourceGroupName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
} | class class_name[name] begin[{]
method[beginDownloadUpdatesAsync, return_type[type[Observable]], modifier[public], parameter[deviceName, resourceGroupName]] begin[{]
return[call[.beginDownloadUpdatesWithServiceResponseAsync, parameter[member[.deviceName], member[.resourceGroupName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Void] operator[>] identifier[beginDownloadUpdatesAsync] operator[SEP] identifier[String] identifier[deviceName] , identifier[String] identifier[resourceGroupName] operator[SEP] {
Keyword[return] identifier[beginDownloadUpdatesWithServiceResponseAsync] operator[SEP] identifier[deviceName] , identifier[resourceGroupName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Void] operator[>] , identifier[Void] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] identifier[Void] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Void] operator[>] identifier[response] operator[SEP] {
Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP]
}
|
public void nextItem() {
moveToNext();
if (currentItemIndex == -1) {
return;
}
IPlayItem item = null;
do {
try {
PlayItemEntry entry = items.get(currentItemIndex);
if (entry != null) {
item = entry.item;
engine.play(item, false);
entry.played = true;
break;
}
} catch (IOException err) {
log.warn("Error while starting to play item, moving to next", err);
// go for next item
moveToNext();
if (currentItemIndex == -1) {
// we reaches the end.
break;
}
} catch (StreamNotFoundException e) {
// go for next item
moveToNext();
if (currentItemIndex == -1) {
// we reaches the end.
break;
}
} catch (IllegalStateException e) {
// an stream is already playing
break;
}
} while (!items.isEmpty());
} | class class_name[name] begin[{]
method[nextItem, return_type[void], modifier[public], parameter[]] begin[{]
call[.moveToNext, parameter[]]
if[binary_operation[member[.currentItemIndex], ==, literal[1]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[IPlayItem], item]
do[call[items.isEmpty, parameter[]]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=currentItemIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=items, selectors=[], type_arguments=None), name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PlayItemEntry, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=play, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=played, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error while starting to play item, moving to next"), MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=moveToNext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=currentItemIndex, 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=[BreakStatement(goto=None, label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=err, types=['IOException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=moveToNext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=currentItemIndex, 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=[BreakStatement(goto=None, label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['StreamNotFoundException'])), CatchClause(block=[BreakStatement(goto=None, label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalStateException']))], finally_block=None, label=None, resources=None)
end[}]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[nextItem] operator[SEP] operator[SEP] {
identifier[moveToNext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentItemIndex] operator[==] operator[-] Other[1] operator[SEP] {
Keyword[return] operator[SEP]
}
identifier[IPlayItem] identifier[item] operator[=] Other[null] operator[SEP] Keyword[do] {
Keyword[try] {
identifier[PlayItemEntry] identifier[entry] operator[=] identifier[items] operator[SEP] identifier[get] operator[SEP] identifier[currentItemIndex] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entry] operator[!=] Other[null] operator[SEP] {
identifier[item] operator[=] identifier[entry] operator[SEP] identifier[item] operator[SEP] identifier[engine] operator[SEP] identifier[play] operator[SEP] identifier[item] , literal[boolean] operator[SEP] operator[SEP] identifier[entry] operator[SEP] identifier[played] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP]
}
}
Keyword[catch] operator[SEP] identifier[IOException] identifier[err] operator[SEP] {
identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[err] operator[SEP] operator[SEP] identifier[moveToNext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentItemIndex] operator[==] operator[-] Other[1] operator[SEP] {
Keyword[break] operator[SEP]
}
}
Keyword[catch] operator[SEP] identifier[StreamNotFoundException] identifier[e] operator[SEP] {
identifier[moveToNext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentItemIndex] operator[==] operator[-] Other[1] operator[SEP] {
Keyword[break] operator[SEP]
}
}
Keyword[catch] operator[SEP] identifier[IllegalStateException] identifier[e] operator[SEP] {
Keyword[break] operator[SEP]
}
}
Keyword[while] operator[SEP] operator[!] identifier[items] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
|
public Slug getSlugInfo(String appName, String slugId) {
return connection.execute(new SlugInfo(appName, slugId), apiKey);
} | class class_name[name] begin[{]
method[getSlugInfo, return_type[type[Slug]], modifier[public], parameter[appName, slugId]] begin[{]
return[call[connection.execute, parameter[ClassCreator(arguments=[MemberReference(member=appName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=slugId, 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=SlugInfo, sub_type=None)), member[.apiKey]]]]
end[}]
END[}] | Keyword[public] identifier[Slug] identifier[getSlugInfo] operator[SEP] identifier[String] identifier[appName] , identifier[String] identifier[slugId] operator[SEP] {
Keyword[return] identifier[connection] operator[SEP] identifier[execute] operator[SEP] Keyword[new] identifier[SlugInfo] operator[SEP] identifier[appName] , identifier[slugId] operator[SEP] , identifier[apiKey] operator[SEP] operator[SEP]
}
|
public void setCommerceWishListService(
com.liferay.commerce.wish.list.service.CommerceWishListService commerceWishListService) {
this.commerceWishListService = commerceWishListService;
} | class class_name[name] begin[{]
method[setCommerceWishListService, return_type[void], modifier[public], parameter[commerceWishListService]] begin[{]
assign[THIS[member[None.commerceWishListService]], member[.commerceWishListService]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setCommerceWishListService] operator[SEP] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[wish] operator[SEP] identifier[list] operator[SEP] identifier[service] operator[SEP] identifier[CommerceWishListService] identifier[commerceWishListService] operator[SEP] {
Keyword[this] operator[SEP] identifier[commerceWishListService] operator[=] identifier[commerceWishListService] operator[SEP]
}
|
public Observable<OpenShiftManagedClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, OpenShiftManagedClusterInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1<ServiceResponse<OpenShiftManagedClusterInner>, OpenShiftManagedClusterInner>() {
@Override
public OpenShiftManagedClusterInner call(ServiceResponse<OpenShiftManagedClusterInner> response) {
return response.body();
}
});
} | class class_name[name] begin[{]
method[beginCreateOrUpdateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, resourceName, parameters]] begin[{]
return[call[.beginCreateOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.resourceName], member[.parameters]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[OpenShiftManagedClusterInner] operator[>] identifier[beginCreateOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[resourceName] , identifier[OpenShiftManagedClusterInner] identifier[parameters] operator[SEP] {
Keyword[return] identifier[beginCreateOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[resourceName] , identifier[parameters] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[OpenShiftManagedClusterInner] operator[>] , identifier[OpenShiftManagedClusterInner] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] identifier[OpenShiftManagedClusterInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[OpenShiftManagedClusterInner] operator[>] identifier[response] operator[SEP] {
Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP]
}
|
public static Dynamic bootstrap(String name, Constructor<?> constructor, Object... rawArgument) {
return bootstrap(name, constructor, Arrays.asList(rawArgument));
} | class class_name[name] begin[{]
method[bootstrap, return_type[type[Dynamic]], modifier[public static], parameter[name, constructor, rawArgument]] begin[{]
return[call[.bootstrap, parameter[member[.name], member[.constructor], call[Arrays.asList, parameter[member[.rawArgument]]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Dynamic] identifier[bootstrap] operator[SEP] identifier[String] identifier[name] , identifier[Constructor] operator[<] operator[?] operator[>] identifier[constructor] , identifier[Object] operator[...] identifier[rawArgument] operator[SEP] {
Keyword[return] identifier[bootstrap] operator[SEP] identifier[name] , identifier[constructor] , identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[rawArgument] operator[SEP] operator[SEP] operator[SEP]
}
|
public static String convertDateToTimeString(Date date) {
if (date == null) {
return null;
} else {
// DateFormat df = new SimpleDateFormat("HH:mm:ss.SSS'Z'");
DateTimeFormatter df = FORMATTER_SECONDS_Z;
return df.print(date.getTime());
}
} | class class_name[name] begin[{]
method[convertDateToTimeString, return_type[type[String]], modifier[public static], parameter[date]] begin[{]
if[binary_operation[member[.date], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
local_variable[type[DateTimeFormatter], df]
return[call[df.print, parameter[call[date.getTime, parameter[]]]]]
end[}]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[convertDateToTimeString] operator[SEP] identifier[Date] identifier[date] operator[SEP] {
Keyword[if] operator[SEP] identifier[date] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyword[else] {
identifier[DateTimeFormatter] identifier[df] operator[=] identifier[FORMATTER_SECONDS_Z] operator[SEP] Keyword[return] identifier[df] operator[SEP] identifier[print] operator[SEP] identifier[date] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
|
public void parametersAreDefined(Report report) throws ParameterNotFoundException {
String[] paramNames;
String sql = report.getSql();
if (sql == null) {
sql = report.getQuery().toString();
}
Query query = new Query(sql);
paramNames = query.getParameterNames();
List<QueryParameter> parameters = report.getParameters();
for (String paramName : paramNames) {
QueryParameter param = null;
for (QueryParameter p : parameters) {
if (paramName.equals(p.getName())) {
param = p;
}
}
if (param == null) {
throw new ParameterNotFoundException(paramName);
}
}
} | class class_name[name] begin[{]
method[parametersAreDefined, return_type[void], modifier[public], parameter[report]] begin[{]
local_variable[type[String], paramNames]
local_variable[type[String], sql]
if[binary_operation[member[.sql], ==, literal[null]]] begin[{]
assign[member[.sql], call[report.getQuery, parameter[]]]
else begin[{]
None
end[}]
local_variable[type[Query], query]
assign[member[.paramNames], call[query.getParameterNames, parameter[]]]
local_variable[type[List], parameters]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=param)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=QueryParameter, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=paramName, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=parameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=QueryParameter, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=paramName, 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=ParameterNotFoundException, sub_type=None)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=paramNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=paramName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)
end[}]
END[}] | Keyword[public] Keyword[void] identifier[parametersAreDefined] operator[SEP] identifier[Report] identifier[report] operator[SEP] Keyword[throws] identifier[ParameterNotFoundException] {
identifier[String] operator[SEP] operator[SEP] identifier[paramNames] operator[SEP] identifier[String] identifier[sql] operator[=] identifier[report] operator[SEP] identifier[getSql] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sql] operator[==] Other[null] operator[SEP] {
identifier[sql] operator[=] identifier[report] operator[SEP] identifier[getQuery] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP]
}
identifier[Query] identifier[query] operator[=] Keyword[new] identifier[Query] operator[SEP] identifier[sql] operator[SEP] operator[SEP] identifier[paramNames] operator[=] identifier[query] operator[SEP] identifier[getParameterNames] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[QueryParameter] operator[>] identifier[parameters] operator[=] identifier[report] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[paramName] operator[:] identifier[paramNames] operator[SEP] {
identifier[QueryParameter] identifier[param] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[QueryParameter] identifier[p] operator[:] identifier[parameters] operator[SEP] {
Keyword[if] operator[SEP] identifier[paramName] operator[SEP] identifier[equals] operator[SEP] identifier[p] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[param] operator[=] identifier[p] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[param] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[ParameterNotFoundException] operator[SEP] identifier[paramName] operator[SEP] operator[SEP]
}
}
}
|
private static RecordType typeFromChar(char recChar) {
for (int i=0; i < numRecChars; i++) {
if (recordChars[i] == recChar) {
return recordTypes[i];
}
}
throw new BitsyException(BitsyErrorCodes.INTERNAL_ERROR, "Unrecognized record type " + recChar);
} | class class_name[name] begin[{]
method[typeFromChar, return_type[type[RecordType]], modifier[private static], parameter[recChar]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=recordChars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=recChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=recordTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numRecChars, 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)
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=INTERNAL_ERROR, postfix_operators=[], prefix_operators=[], qualifier=BitsyErrorCodes, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unrecognized record type "), operandr=MemberReference(member=recChar, 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=BitsyException, sub_type=None)), label=None)
end[}]
END[}] | Keyword[private] Keyword[static] identifier[RecordType] identifier[typeFromChar] operator[SEP] Keyword[char] identifier[recChar] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numRecChars] operator[SEP] identifier[i] operator[++] operator[SEP] {
Keyword[if] operator[SEP] identifier[recordChars] operator[SEP] identifier[i] operator[SEP] operator[==] identifier[recChar] operator[SEP] {
Keyword[return] identifier[recordTypes] operator[SEP] identifier[i] operator[SEP] operator[SEP]
}
}
Keyword[throw] Keyword[new] identifier[BitsyException] operator[SEP] identifier[BitsyErrorCodes] operator[SEP] identifier[INTERNAL_ERROR] , literal[String] operator[+] identifier[recChar] operator[SEP] operator[SEP]
}
|
public CrawlDatum next(){
int topN = getConf().getTopN();
int maxExecuteCount = getConf().getOrDefault(Configuration.KEY_MAX_EXECUTE_COUNT, Integer.MAX_VALUE);
if(topN > 0 && totalGenerate >= topN){
return null;
}
CrawlDatum datum;
while (true) {
try {
datum = nextWithoutFilter();
if (datum == null) {
return datum;
}
if(filter == null || (datum = filter.filter(datum))!=null){
if (datum.getExecuteCount() > maxExecuteCount) {
continue;
}
totalGenerate += 1;
return datum;
}
} catch (Exception e) {
LOG.info("Exception when generating", e);
return null;
}
}
} | class class_name[name] begin[{]
method[next, return_type[type[CrawlDatum]], modifier[public], parameter[]] begin[{]
local_variable[type[int], topN]
local_variable[type[int], maxExecuteCount]
if[binary_operation[binary_operation[member[.topN], >, literal[0]], &&, binary_operation[member[.totalGenerate], >=, member[.topN]]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[CrawlDatum], datum]
while[literal[true]] begin[{]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=datum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=nextWithoutFilter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=datum, 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=[ReturnStatement(expression=MemberReference(member=datum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=datum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=datum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=filter, postfix_operators=[], prefix_operators=[], qualifier=filter, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getExecuteCount, postfix_operators=[], prefix_operators=[], qualifier=datum, selectors=[], type_arguments=None), operandr=MemberReference(member=maxExecuteCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=totalGenerate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None), ReturnStatement(expression=MemberReference(member=datum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception when generating"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)
end[}]
end[}]
END[}] | Keyword[public] identifier[CrawlDatum] identifier[next] operator[SEP] operator[SEP] {
Keyword[int] identifier[topN] operator[=] identifier[getConf] operator[SEP] operator[SEP] operator[SEP] identifier[getTopN] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[maxExecuteCount] operator[=] identifier[getConf] operator[SEP] operator[SEP] operator[SEP] identifier[getOrDefault] operator[SEP] identifier[Configuration] operator[SEP] identifier[KEY_MAX_EXECUTE_COUNT] , identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[topN] operator[>] Other[0] operator[&&] identifier[totalGenerate] operator[>=] identifier[topN] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
identifier[CrawlDatum] identifier[datum] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] {
Keyword[try] {
identifier[datum] operator[=] identifier[nextWithoutFilter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[datum] operator[==] Other[null] operator[SEP] {
Keyword[return] identifier[datum] operator[SEP]
}
Keyword[if] operator[SEP] identifier[filter] operator[==] Other[null] operator[||] operator[SEP] identifier[datum] operator[=] identifier[filter] operator[SEP] identifier[filter] operator[SEP] identifier[datum] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[datum] operator[SEP] identifier[getExecuteCount] operator[SEP] operator[SEP] operator[>] identifier[maxExecuteCount] operator[SEP] {
Keyword[continue] operator[SEP]
}
identifier[totalGenerate] operator[+=] Other[1] operator[SEP] Keyword[return] identifier[datum] operator[SEP]
}
}
Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] {
identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP]
}
}
}
|
private void commitServices() {
PartitionMigrationEvent event = getPartitionMigrationEvent();
for (MigrationAwareService service : getMigrationAwareServices()) {
try {
service.commitMigration(event);
} catch (Throwable e) {
logger.warning("While promoting " + getPartitionMigrationEvent(), e);
}
}
} | class class_name[name] begin[{]
method[commitServices, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[PartitionMigrationEvent], event]
ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=commitMigration, postfix_operators=[], prefix_operators=[], qualifier=service, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="While promoting "), operandr=MethodInvocation(arguments=[], member=getPartitionMigrationEvent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warning, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getMigrationAwareServices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=service)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MigrationAwareService, sub_type=None))), label=None)
end[}]
END[}] | Keyword[private] Keyword[void] identifier[commitServices] operator[SEP] operator[SEP] {
identifier[PartitionMigrationEvent] identifier[event] operator[=] identifier[getPartitionMigrationEvent] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[MigrationAwareService] identifier[service] operator[:] identifier[getMigrationAwareServices] operator[SEP] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[service] operator[SEP] identifier[commitMigration] operator[SEP] identifier[event] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] {
identifier[logger] operator[SEP] identifier[warning] operator[SEP] literal[String] operator[+] identifier[getPartitionMigrationEvent] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP]
}
}
}
|
public static String getVersion()
{
String rev = getBuildRevision();
Date date = getBuildDate();
StringBuilder result = new StringBuilder();
result.append(getReleaseName());
if (!"".equals(rev) || date != null)
{
result.append(" (");
boolean added = false;
if (!"".equals(rev))
{
result.append("rev. ");
result.append(rev);
added = true;
}
if (date != null)
{
result.append(added ? ", built " : "");
SimpleDateFormat d = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
result.append(d.format(date));
}
result.append(")");
}
return result.toString();
} | class class_name[name] begin[{]
method[getVersion, return_type[type[String]], modifier[public static], parameter[]] begin[{]
local_variable[type[String], rev]
local_variable[type[Date], date]
local_variable[type[StringBuilder], result]
call[result.append, parameter[call[.getReleaseName, parameter[]]]]
if[binary_operation[literal[""], ||, binary_operation[member[.date], !=, literal[null]]]] begin[{]
call[result.append, parameter[literal[" ("]]]
local_variable[type[boolean], added]
if[literal[""]] begin[{]
call[result.append, parameter[literal["rev. "]]]
call[result.append, parameter[member[.rev]]]
assign[member[.added], literal[true]]
else begin[{]
None
end[}]
if[binary_operation[member[.date], !=, literal[null]]] begin[{]
call[result.append, parameter[TernaryExpression(condition=MemberReference(member=added, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", built "))]]
local_variable[type[SimpleDateFormat], d]
call[result.append, parameter[call[d.format, parameter[member[.date]]]]]
else begin[{]
None
end[}]
call[result.append, parameter[literal[")"]]]
else begin[{]
None
end[}]
return[call[result.toString, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[getVersion] operator[SEP] operator[SEP] {
identifier[String] identifier[rev] operator[=] identifier[getBuildRevision] operator[SEP] operator[SEP] operator[SEP] identifier[Date] identifier[date] operator[=] identifier[getBuildDate] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[result] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[getReleaseName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[rev] operator[SEP] operator[||] identifier[date] operator[!=] Other[null] operator[SEP] {
identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[boolean] identifier[added] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[rev] operator[SEP] operator[SEP] {
identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[rev] operator[SEP] operator[SEP] identifier[added] operator[=] literal[boolean] operator[SEP]
}
Keyword[if] operator[SEP] identifier[date] operator[!=] Other[null] operator[SEP] {
identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[added] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] identifier[SimpleDateFormat] identifier[d] operator[=] Keyword[new] identifier[SimpleDateFormat] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[d] operator[SEP] identifier[format] operator[SEP] identifier[date] operator[SEP] operator[SEP] operator[SEP]
}
identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[return] identifier[result] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP]
}
|
public Postcard withCharSequence(@Nullable String key, @Nullable CharSequence value) {
mBundle.putCharSequence(key, value);
return this;
} | class class_name[name] begin[{]
method[withCharSequence, return_type[type[Postcard]], modifier[public], parameter[key, value]] begin[{]
call[mBundle.putCharSequence, parameter[member[.key], member[.value]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[Postcard] identifier[withCharSequence] operator[SEP] annotation[@] identifier[Nullable] identifier[String] identifier[key] , annotation[@] identifier[Nullable] identifier[CharSequence] identifier[value] operator[SEP] {
identifier[mBundle] operator[SEP] identifier[putCharSequence] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP]
}
|
public void matches(Session other) throws ClientException {
compareTransferParams(other);
compareServerMode(other);
if (needsGridFTP() && transferMode != MODE_EBLOCK) {
throw new ClientException(ClientException.BAD_MODE,
"Extended block mode necessary");
}
if (other instanceof GridFTPSession &&
((GridFTPSession) other).needsGridFTP() &&
transferMode != MODE_EBLOCK) {
throw new ClientException(ClientException.BAD_MODE,
"Extended block mode necessary");
}
} | class class_name[name] begin[{]
method[matches, return_type[void], modifier[public], parameter[other]] begin[{]
call[.compareTransferParams, parameter[member[.other]]]
call[.compareServerMode, parameter[member[.other]]]
if[binary_operation[call[.needsGridFTP, parameter[]], &&, binary_operation[member[.transferMode], !=, member[.MODE_EBLOCK]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=BAD_MODE, postfix_operators=[], prefix_operators=[], qualifier=ClientException, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Extended block mode necessary")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClientException, sub_type=None)), label=None)
else begin[{]
None
end[}]
if[binary_operation[binary_operation[binary_operation[member[.other], instanceof, type[GridFTPSession]], &&, Cast(expression=MemberReference(member=other, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=GridFTPSession, sub_type=None))], &&, binary_operation[member[.transferMode], !=, member[.MODE_EBLOCK]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=BAD_MODE, postfix_operators=[], prefix_operators=[], qualifier=ClientException, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Extended block mode necessary")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClientException, sub_type=None)), label=None)
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[matches] operator[SEP] identifier[Session] identifier[other] operator[SEP] Keyword[throws] identifier[ClientException] {
identifier[compareTransferParams] operator[SEP] identifier[other] operator[SEP] operator[SEP] identifier[compareServerMode] operator[SEP] identifier[other] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[needsGridFTP] operator[SEP] operator[SEP] operator[&&] identifier[transferMode] operator[!=] identifier[MODE_EBLOCK] operator[SEP] {
Keyword[throw] Keyword[new] identifier[ClientException] operator[SEP] identifier[ClientException] operator[SEP] identifier[BAD_MODE] , literal[String] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[other] Keyword[instanceof] identifier[GridFTPSession] operator[&&] operator[SEP] operator[SEP] identifier[GridFTPSession] operator[SEP] identifier[other] operator[SEP] operator[SEP] identifier[needsGridFTP] operator[SEP] operator[SEP] operator[&&] identifier[transferMode] operator[!=] identifier[MODE_EBLOCK] operator[SEP] {
Keyword[throw] Keyword[new] identifier[ClientException] operator[SEP] identifier[ClientException] operator[SEP] identifier[BAD_MODE] , literal[String] operator[SEP] operator[SEP]
}
}
|
public CompartmentDefinition addResource(CompartmentDefinitionResourceComponent t) { //3
if (t == null)
return this;
if (this.resource == null)
this.resource = new ArrayList<CompartmentDefinitionResourceComponent>();
this.resource.add(t);
return this;
} | class class_name[name] begin[{]
method[addResource, return_type[type[CompartmentDefinition]], modifier[public], parameter[t]] begin[{]
if[binary_operation[member[.t], ==, literal[null]]] begin[{]
return[THIS[]]
else begin[{]
None
end[}]
if[binary_operation[THIS[member[None.resource]], ==, literal[null]]] begin[{]
assign[THIS[member[None.resource]], 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=CompartmentDefinitionResourceComponent, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))]
else begin[{]
None
end[}]
THIS[member[None.resource]call[None.add, parameter[member[.t]]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[CompartmentDefinition] identifier[addResource] operator[SEP] identifier[CompartmentDefinitionResourceComponent] identifier[t] operator[SEP] {
Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] Keyword[return] Keyword[this] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[resource] operator[==] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[resource] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[CompartmentDefinitionResourceComponent] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[resource] operator[SEP] identifier[add] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP]
}
|
public MediaServiceInner create(String resourceGroupName, String mediaServiceName, MediaServiceInner parameters) {
return createWithServiceResponseAsync(resourceGroupName, mediaServiceName, parameters).toBlocking().single().body();
} | class class_name[name] begin[{]
method[create, return_type[type[MediaServiceInner]], modifier[public], parameter[resourceGroupName, mediaServiceName, parameters]] begin[{]
return[call[.createWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.mediaServiceName], member[.parameters]]]]
end[}]
END[}] | Keyword[public] identifier[MediaServiceInner] identifier[create] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[mediaServiceName] , identifier[MediaServiceInner] identifier[parameters] operator[SEP] {
Keyword[return] identifier[createWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[mediaServiceName] , identifier[parameters] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP]
}
|
public String compose(final ReceivedEmail receivedEmail) {
Message msg = receivedEmail.originalMessage();
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
try {
msg.writeTo(outputStream);
} catch (IOException | MessagingException e) {
throw new MailException(e);
}
return outputStream.toString();
} | class class_name[name] begin[{]
method[compose, return_type[type[String]], modifier[public], parameter[receivedEmail]] begin[{]
local_variable[type[Message], msg]
local_variable[type[ByteArrayOutputStream], outputStream]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=outputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeTo, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MailException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException', 'MessagingException']))], finally_block=None, label=None, resources=None)
return[call[outputStream.toString, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[String] identifier[compose] operator[SEP] Keyword[final] identifier[ReceivedEmail] identifier[receivedEmail] operator[SEP] {
identifier[Message] identifier[msg] operator[=] identifier[receivedEmail] operator[SEP] identifier[originalMessage] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ByteArrayOutputStream] identifier[outputStream] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[msg] operator[SEP] identifier[writeTo] operator[SEP] identifier[outputStream] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[IOException] operator[|] identifier[MessagingException] identifier[e] operator[SEP] {
Keyword[throw] Keyword[new] identifier[MailException] operator[SEP] identifier[e] operator[SEP] operator[SEP]
}
Keyword[return] identifier[outputStream] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP]
}
|
public static alluxio.grpc.FileInfo toProto(FileInfo fileInfo) {
List<alluxio.grpc.FileBlockInfo> fileBlockInfos = new ArrayList<>();
for (FileBlockInfo fileBlockInfo : fileInfo.getFileBlockInfos()) {
fileBlockInfos.add(toProto(fileBlockInfo));
}
alluxio.grpc.FileInfo.Builder builder = alluxio.grpc.FileInfo.newBuilder()
.setFileId(fileInfo.getFileId()).setName(fileInfo.getName()).setPath(fileInfo.getPath())
.setUfsPath(fileInfo.getUfsPath()).setLength(fileInfo.getLength())
.setBlockSizeBytes(fileInfo.getBlockSizeBytes())
.setCreationTimeMs(fileInfo.getCreationTimeMs()).setCompleted(fileInfo.isCompleted())
.setFolder(fileInfo.isFolder()).setPinned(fileInfo.isPinned())
.setCacheable(fileInfo.isCacheable()).setPersisted(fileInfo.isPersisted())
.addAllBlockIds(fileInfo.getBlockIds())
.setLastModificationTimeMs(fileInfo.getLastModificationTimeMs()).setTtl(fileInfo.getTtl())
.setOwner(fileInfo.getOwner()).setGroup(fileInfo.getGroup()).setMode(fileInfo.getMode())
.setPersistenceState(fileInfo.getPersistenceState()).setMountPoint(fileInfo.isMountPoint())
.addAllFileBlockInfos(fileBlockInfos)
.setTtlAction(fileInfo.getTtlAction()).setMountId(fileInfo.getMountId())
.setInAlluxioPercentage(fileInfo.getInAlluxioPercentage())
.setInMemoryPercentage(fileInfo.getInMemoryPercentage())
.setUfsFingerprint(fileInfo.getUfsFingerprint())
.setReplicationMax(fileInfo.getReplicationMax())
.setReplicationMin(fileInfo.getReplicationMin());
if (!fileInfo.getAcl().equals(AccessControlList.EMPTY_ACL)) {
builder.setAcl(toProto(fileInfo.getAcl()));
}
if (!fileInfo.getDefaultAcl().equals(DefaultAccessControlList.EMPTY_DEFAULT_ACL)) {
builder.setDefaultAcl(toProto(fileInfo.getDefaultAcl()));
}
return builder.build();
} | class class_name[name] begin[{]
method[toProto, return_type[type[alluxio]], modifier[public static], parameter[fileInfo]] begin[{]
local_variable[type[List], fileBlockInfos]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=fileBlockInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toProto, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=fileBlockInfos, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getFileBlockInfos, postfix_operators=[], prefix_operators=[], qualifier=fileInfo, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=fileBlockInfo)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileBlockInfo, sub_type=None))), label=None)
local_variable[type[alluxio], builder]
if[call[fileInfo.getAcl, parameter[]]] begin[{]
call[builder.setAcl, parameter[call[.toProto, parameter[call[fileInfo.getAcl, parameter[]]]]]]
else begin[{]
None
end[}]
if[call[fileInfo.getDefaultAcl, parameter[]]] begin[{]
call[builder.setDefaultAcl, parameter[call[.toProto, parameter[call[fileInfo.getDefaultAcl, parameter[]]]]]]
else begin[{]
None
end[}]
return[call[builder.build, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[FileInfo] identifier[toProto] operator[SEP] identifier[FileInfo] identifier[fileInfo] operator[SEP] {
identifier[List] operator[<] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[FileBlockInfo] operator[>] identifier[fileBlockInfos] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[FileBlockInfo] identifier[fileBlockInfo] operator[:] identifier[fileInfo] operator[SEP] identifier[getFileBlockInfos] operator[SEP] operator[SEP] operator[SEP] {
identifier[fileBlockInfos] operator[SEP] identifier[add] operator[SEP] identifier[toProto] operator[SEP] identifier[fileBlockInfo] operator[SEP] operator[SEP] operator[SEP]
}
identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[FileInfo] operator[SEP] identifier[Builder] identifier[builder] operator[=] identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[FileInfo] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setFileId] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getFileId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setName] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setPath] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setUfsPath] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getUfsPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setLength] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setBlockSizeBytes] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getBlockSizeBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setCreationTimeMs] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getCreationTimeMs] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setCompleted] operator[SEP] identifier[fileInfo] operator[SEP] identifier[isCompleted] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setFolder] operator[SEP] identifier[fileInfo] operator[SEP] identifier[isFolder] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setPinned] operator[SEP] identifier[fileInfo] operator[SEP] identifier[isPinned] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setCacheable] operator[SEP] identifier[fileInfo] operator[SEP] identifier[isCacheable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setPersisted] operator[SEP] identifier[fileInfo] operator[SEP] identifier[isPersisted] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addAllBlockIds] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getBlockIds] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setLastModificationTimeMs] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getLastModificationTimeMs] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setTtl] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getTtl] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setOwner] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setGroup] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getGroup] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setMode] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getMode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setPersistenceState] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getPersistenceState] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setMountPoint] operator[SEP] identifier[fileInfo] operator[SEP] identifier[isMountPoint] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addAllFileBlockInfos] operator[SEP] identifier[fileBlockInfos] operator[SEP] operator[SEP] identifier[setTtlAction] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getTtlAction] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setMountId] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getMountId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setInAlluxioPercentage] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getInAlluxioPercentage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setInMemoryPercentage] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getInMemoryPercentage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setUfsFingerprint] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getUfsFingerprint] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setReplicationMax] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getReplicationMax] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setReplicationMin] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getReplicationMin] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[fileInfo] operator[SEP] identifier[getAcl] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[AccessControlList] operator[SEP] identifier[EMPTY_ACL] operator[SEP] operator[SEP] {
identifier[builder] operator[SEP] identifier[setAcl] operator[SEP] identifier[toProto] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getAcl] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] operator[!] identifier[fileInfo] operator[SEP] identifier[getDefaultAcl] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[DefaultAccessControlList] operator[SEP] identifier[EMPTY_DEFAULT_ACL] operator[SEP] operator[SEP] {
identifier[builder] operator[SEP] identifier[setDefaultAcl] operator[SEP] identifier[toProto] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getDefaultAcl] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP]
}
|
Segment getSegment(int vertex) {
if (m_segments != null) {
int vindex = getVertexIndex(vertex);
return m_segments.get(vindex);
}
return null;
} | class class_name[name] begin[{]
method[getSegment, return_type[type[Segment]], modifier[default], parameter[vertex]] begin[{]
if[binary_operation[member[.m_segments], !=, literal[null]]] begin[{]
local_variable[type[int], vindex]
return[call[m_segments.get, parameter[member[.vindex]]]]
else begin[{]
None
end[}]
return[literal[null]]
end[}]
END[}] | identifier[Segment] identifier[getSegment] operator[SEP] Keyword[int] identifier[vertex] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_segments] operator[!=] Other[null] operator[SEP] {
Keyword[int] identifier[vindex] operator[=] identifier[getVertexIndex] operator[SEP] identifier[vertex] operator[SEP] operator[SEP] Keyword[return] identifier[m_segments] operator[SEP] identifier[get] operator[SEP] identifier[vindex] operator[SEP] operator[SEP]
}
Keyword[return] Other[null] operator[SEP]
}
|
public static PayloadReader reader(final String pathAccountSid,
final String pathReferenceSid,
final String pathAddOnResultSid) {
return new PayloadReader(pathAccountSid, pathReferenceSid, pathAddOnResultSid);
} | class class_name[name] begin[{]
method[reader, return_type[type[PayloadReader]], modifier[public static], parameter[pathAccountSid, pathReferenceSid, pathAddOnResultSid]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=pathAccountSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pathReferenceSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pathAddOnResultSid, 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=PayloadReader, sub_type=None))]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[PayloadReader] identifier[reader] operator[SEP] Keyword[final] identifier[String] identifier[pathAccountSid] , Keyword[final] identifier[String] identifier[pathReferenceSid] , Keyword[final] identifier[String] identifier[pathAddOnResultSid] operator[SEP] {
Keyword[return] Keyword[new] identifier[PayloadReader] operator[SEP] identifier[pathAccountSid] , identifier[pathReferenceSid] , identifier[pathAddOnResultSid] operator[SEP] operator[SEP]
}
|
private <T> List<T> readCSVByMapHandler(InputStream is, Class<T> clazz)
throws IOException, Excel4JException {
List<T> records = new ArrayList<>();
List<ExcelHeader> headers = Utils.getHeaderList(clazz);
if (null == headers || headers.size() <= 0) {
throw new Excel4jReadException("[" + clazz + "] must configuration @ExcelFiled");
}
String[] csvHeaders = new String[headers.size()];
for (int i = 0; i < headers.size(); i++) {
csvHeaders[i] = headers.get(i).getTitle();
}
CSVFormat format = CSVFormat.EXCEL.withHeader(csvHeaders).withSkipHeaderRecord(true);
try (Reader read = new InputStreamReader(is, StandardCharsets.UTF_8);
CSVParser parser = new CSVParser(read, format)) {
for (CSVRecord _parser : parser) {
T obj;
try {
obj = clazz.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
throw new Excel4jReadException(e);
}
for (ExcelHeader header : headers) {
String value = _parser.get(header.getTitle());
Object objectVal;
String filed = header.getFiled();
// 读取转换器
if (null != header.getReadConverter() &&
header.getReadConverter().getClass() != DefaultConvertible.class) {
objectVal = header.getReadConverter().execRead(value);
} else {
// 默认转换
objectVal = Utils.str2TargetClass(value, header.getFiledClazz());
}
Utils.copyProperty(obj, filed, objectVal);
}
records.add(obj);
}
}
return records;
} | class class_name[name] begin[{]
method[readCSVByMapHandler, return_type[type[List]], modifier[private], parameter[is, clazz]] begin[{]
local_variable[type[List], records]
local_variable[type[List], headers]
if[binary_operation[binary_operation[literal[null], ==, member[.headers]], ||, binary_operation[call[headers.size, parameter[]], <=, literal[0]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="["), operandr=MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] must configuration @ExcelFiled"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Excel4jReadException, sub_type=None)), label=None)
else begin[{]
None
end[}]
local_variable[type[String], csvHeaders]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=csvHeaders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=headers, selectors=[MethodInvocation(arguments=[], member=getTitle, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], 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=headers, 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)
local_variable[type[CSVFormat], format]
TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=obj)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Excel4jReadException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InstantiationException', 'IllegalAccessException']))], finally_block=None, label=None, resources=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTitle, postfix_operators=[], prefix_operators=[], qualifier=header, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=_parser, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=objectVal)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getFiled, postfix_operators=[], prefix_operators=[], qualifier=header, selectors=[], type_arguments=None), name=filed)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MethodInvocation(arguments=[], member=getReadConverter, postfix_operators=[], prefix_operators=[], qualifier=header, selectors=[], type_arguments=None), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getReadConverter, postfix_operators=[], prefix_operators=[], qualifier=header, selectors=[MethodInvocation(arguments=[], member=getClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DefaultConvertible, sub_type=None)), operator=!=), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=objectVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getFiledClazz, postfix_operators=[], prefix_operators=[], qualifier=header, selectors=[], type_arguments=None)], member=str2TargetClass, postfix_operators=[], prefix_operators=[], qualifier=Utils, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=objectVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getReadConverter, postfix_operators=[], prefix_operators=[], qualifier=header, selectors=[MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=execRead, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=objectVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copyProperty, postfix_operators=[], prefix_operators=[], qualifier=Utils, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=headers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=header)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ExcelHeader, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=records, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=parser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=_parser)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CSVRecord, sub_type=None))), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=read, type=ReferenceType(arguments=None, dimensions=[], name=Reader, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=UTF_8, postfix_operators=[], prefix_operators=[], qualifier=StandardCharsets, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InputStreamReader, sub_type=None))), TryResource(annotations=[], modifiers=set(), name=parser, type=ReferenceType(arguments=None, dimensions=[], name=CSVParser, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CSVParser, sub_type=None)))])
return[member[.records]]
end[}]
END[}] | Keyword[private] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[readCSVByMapHandler] operator[SEP] identifier[InputStream] identifier[is] , identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] Keyword[throws] identifier[IOException] , identifier[Excel4JException] {
identifier[List] operator[<] identifier[T] operator[>] identifier[records] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[ExcelHeader] operator[>] identifier[headers] operator[=] identifier[Utils] operator[SEP] identifier[getHeaderList] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[headers] operator[||] identifier[headers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<=] Other[0] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Excel4jReadException] operator[SEP] literal[String] operator[+] identifier[clazz] operator[+] literal[String] operator[SEP] operator[SEP]
}
identifier[String] operator[SEP] operator[SEP] identifier[csvHeaders] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[headers] operator[SEP] identifier[size] 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[headers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] {
identifier[csvHeaders] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[headers] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP]
}
identifier[CSVFormat] identifier[format] operator[=] identifier[CSVFormat] operator[SEP] identifier[EXCEL] operator[SEP] identifier[withHeader] operator[SEP] identifier[csvHeaders] operator[SEP] operator[SEP] identifier[withSkipHeaderRecord] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[Reader] identifier[read] operator[=] Keyword[new] identifier[InputStreamReader] operator[SEP] identifier[is] , identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] identifier[CSVParser] identifier[parser] operator[=] Keyword[new] identifier[CSVParser] operator[SEP] identifier[read] , identifier[format] operator[SEP] operator[SEP] {
Keyword[for] operator[SEP] identifier[CSVRecord] identifier[_parser] operator[:] identifier[parser] operator[SEP] {
identifier[T] identifier[obj] operator[SEP] Keyword[try] {
identifier[obj] operator[=] identifier[clazz] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[InstantiationException] operator[|] identifier[IllegalAccessException] identifier[e] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Excel4jReadException] operator[SEP] identifier[e] operator[SEP] operator[SEP]
}
Keyword[for] operator[SEP] identifier[ExcelHeader] identifier[header] operator[:] identifier[headers] operator[SEP] {
identifier[String] identifier[value] operator[=] identifier[_parser] operator[SEP] identifier[get] operator[SEP] identifier[header] operator[SEP] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[objectVal] operator[SEP] identifier[String] identifier[filed] operator[=] identifier[header] operator[SEP] identifier[getFiled] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[header] operator[SEP] identifier[getReadConverter] operator[SEP] operator[SEP] operator[&&] identifier[header] operator[SEP] identifier[getReadConverter] operator[SEP] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[!=] identifier[DefaultConvertible] operator[SEP] Keyword[class] operator[SEP] {
identifier[objectVal] operator[=] identifier[header] operator[SEP] identifier[getReadConverter] operator[SEP] operator[SEP] operator[SEP] identifier[execRead] operator[SEP] identifier[value] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[objectVal] operator[=] identifier[Utils] operator[SEP] identifier[str2TargetClass] operator[SEP] identifier[value] , identifier[header] operator[SEP] identifier[getFiledClazz] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
identifier[Utils] operator[SEP] identifier[copyProperty] operator[SEP] identifier[obj] , identifier[filed] , identifier[objectVal] operator[SEP] operator[SEP]
}
identifier[records] operator[SEP] identifier[add] operator[SEP] identifier[obj] operator[SEP] operator[SEP]
}
}
Keyword[return] identifier[records] operator[SEP]
}
|
public XEvent set(int index, XEvent event) {
try {
XEvent result = events.replace(event, index);
return result;
} catch (IOException e) {
e.printStackTrace();
return null;
}
} | class class_name[name] begin[{]
method[set, return_type[type[XEvent]], modifier[public], parameter[index, event]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=replace, postfix_operators=[], prefix_operators=[], qualifier=events, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XEvent, sub_type=None)), ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None)
end[}]
END[}] | Keyword[public] identifier[XEvent] identifier[set] operator[SEP] Keyword[int] identifier[index] , identifier[XEvent] identifier[event] operator[SEP] {
Keyword[try] {
identifier[XEvent] identifier[result] operator[=] identifier[events] operator[SEP] identifier[replace] operator[SEP] identifier[event] , identifier[index] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] {
identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP]
}
}
|
public List<String> getValuesOfColumn(final int columnNumber,
final String sqlQuery) throws SQLException {
LOG.info("Connecting to: " + this.dbString + " with " + this.usr
+ " and " + this.pwd);
LOG.info("Executing: " + sqlQuery);
List<String> result = new ArrayList<String>();
List<List<String>> allResults = this.doSelect(sqlQuery);
for (List<String> list : allResults) {
result.add(list.get(columnNumber));
}
LOG.info("Result returned after running " + sqlQuery + " is: " + result);
return result;
} | class class_name[name] begin[{]
method[getValuesOfColumn, return_type[type[List]], modifier[public], parameter[columnNumber, sqlQuery]] begin[{]
call[LOG.info, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["Connecting to: "], +, THIS[member[None.dbString]]], +, literal[" with "]], +, THIS[member[None.usr]]], +, literal[" and "]], +, THIS[member[None.pwd]]]]]
call[LOG.info, parameter[binary_operation[literal["Executing: "], +, member[.sqlQuery]]]]
local_variable[type[List], result]
local_variable[type[List], allResults]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=columnNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=allResults, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=list)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None))), label=None)
call[LOG.info, parameter[binary_operation[binary_operation[binary_operation[literal["Result returned after running "], +, member[.sqlQuery]], +, literal[" is: "]], +, member[.result]]]]
return[member[.result]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getValuesOfColumn] operator[SEP] Keyword[final] Keyword[int] identifier[columnNumber] , Keyword[final] identifier[String] identifier[sqlQuery] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] Keyword[this] operator[SEP] identifier[dbString] operator[+] literal[String] operator[+] Keyword[this] operator[SEP] identifier[usr] operator[+] literal[String] operator[+] Keyword[this] operator[SEP] identifier[pwd] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[sqlQuery] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[List] operator[<] identifier[String] operator[>] operator[>] identifier[allResults] operator[=] Keyword[this] operator[SEP] identifier[doSelect] operator[SEP] identifier[sqlQuery] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[list] operator[:] identifier[allResults] operator[SEP] {
identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[list] operator[SEP] identifier[get] operator[SEP] identifier[columnNumber] operator[SEP] operator[SEP] operator[SEP]
}
identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[sqlQuery] operator[+] literal[String] operator[+] identifier[result] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP]
}
|
public final double[] getDpiSuggestions() {
if (this.dpiSuggestions == null) {
List<Double> list = new ArrayList<>();
for (double suggestion: DEFAULT_DPI_VALUES) {
if (suggestion <= this.maxDpi) {
list.add(suggestion);
}
}
double[] suggestions = new double[list.size()];
for (int i = 0; i < suggestions.length; i++) {
suggestions[i] = list.get(i);
}
return suggestions;
}
return this.dpiSuggestions;
} | class class_name[name] begin[{]
method[getDpiSuggestions, return_type[type[double]], modifier[final public], parameter[]] begin[{]
if[binary_operation[THIS[member[None.dpiSuggestions]], ==, literal[null]]] begin[{]
local_variable[type[List], list]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=suggestion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=maxDpi, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=suggestion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=DEFAULT_DPI_VALUES, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=suggestion)], modifiers=set(), type=BasicType(dimensions=[], name=double))), label=None)
local_variable[type[double], suggestions]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=suggestions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=list, 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=suggestions, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
return[member[.suggestions]]
else begin[{]
None
end[}]
return[THIS[member[None.dpiSuggestions]]]
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[getDpiSuggestions] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[dpiSuggestions] operator[==] Other[null] operator[SEP] {
identifier[List] operator[<] identifier[Double] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[double] identifier[suggestion] operator[:] identifier[DEFAULT_DPI_VALUES] operator[SEP] {
Keyword[if] operator[SEP] identifier[suggestion] operator[<=] Keyword[this] operator[SEP] identifier[maxDpi] operator[SEP] {
identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[suggestion] operator[SEP] operator[SEP]
}
}
Keyword[double] operator[SEP] operator[SEP] identifier[suggestions] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[list] operator[SEP] identifier[size] 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[suggestions] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] {
identifier[suggestions] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[list] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP]
}
Keyword[return] identifier[suggestions] operator[SEP]
}
Keyword[return] Keyword[this] operator[SEP] identifier[dpiSuggestions] operator[SEP]
}
|
private void fastDoubleFormat(double d,
boolean negative) {
char[] container = fastPathData.fastPathContainer;
/*
* The principle of the algorithm is to :
* - Break the passed double into its integral and fractional parts
* converted into integers.
* - Then decide if rounding up must be applied or not by following
* the half-even rounding rule, first using approximated scaled
* fractional part.
* - For the difficult cases (approximated scaled fractional part
* being exactly 0.5d), we refine the rounding decision by calling
* exactRoundUp utility method that both calculates the exact roundoff
* on the approximation and takes correct rounding decision.
* - We round-up the fractional part if needed, possibly propagating the
* rounding to integral part if we meet a "all-nine" case for the
* scaled fractional part.
* - We then collect digits from the resulting integral and fractional
* parts, also setting the required grouping chars on the fly.
* - Then we localize the collected digits if needed, and
* - Finally prepend/append prefix/suffix if any is needed.
*/
// Exact integral part of d.
int integralPartAsInt = (int) d;
// Exact fractional part of d (since we subtract it's integral part).
double exactFractionalPart = d - (double) integralPartAsInt;
// Approximated scaled fractional part of d (due to multiplication).
double scaledFractional =
exactFractionalPart * fastPathData.fractionalScaleFactor;
// Exact integral part of scaled fractional above.
int fractionalPartAsInt = (int) scaledFractional;
// Exact fractional part of scaled fractional above.
scaledFractional = scaledFractional - (double) fractionalPartAsInt;
// Only when scaledFractional is exactly 0.5d do we have to do exact
// calculations and take fine-grained rounding decision, since
// approximated results above may lead to incorrect decision.
// Otherwise comparing against 0.5d (strictly greater or less) is ok.
boolean roundItUp = false;
if (scaledFractional >= 0.5d) {
if (scaledFractional == 0.5d)
// Rounding need fine-grained decision.
roundItUp = exactRoundUp(exactFractionalPart, fractionalPartAsInt);
else
roundItUp = true;
if (roundItUp) {
// Rounds up both fractional part (and also integral if needed).
if (fractionalPartAsInt < fastPathData.fractionalMaxIntBound) {
fractionalPartAsInt++;
} else {
// Propagates rounding to integral part since "all nines" case.
fractionalPartAsInt = 0;
integralPartAsInt++;
}
}
}
// Collecting digits.
collectFractionalDigits(fractionalPartAsInt, container,
fastPathData.fractionalFirstIndex);
collectIntegralDigits(integralPartAsInt, container,
fastPathData.integralLastIndex);
// Localizing digits.
if (fastPathData.zeroDelta != 0)
localizeDigits(container);
// Adding prefix and suffix.
if (negative) {
if (fastPathData.negativeAffixesRequired)
addAffixes(container,
fastPathData.charsNegativePrefix,
fastPathData.charsNegativeSuffix);
} else if (fastPathData.positiveAffixesRequired)
addAffixes(container,
fastPathData.charsPositivePrefix,
fastPathData.charsPositiveSuffix);
} | class class_name[name] begin[{]
method[fastDoubleFormat, return_type[void], modifier[private], parameter[d, negative]] begin[{]
local_variable[type[char], container]
local_variable[type[int], integralPartAsInt]
local_variable[type[double], exactFractionalPart]
local_variable[type[double], scaledFractional]
local_variable[type[int], fractionalPartAsInt]
assign[member[.scaledFractional], binary_operation[member[.scaledFractional], -, Cast(expression=MemberReference(member=fractionalPartAsInt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=double))]]
local_variable[type[boolean], roundItUp]
if[binary_operation[member[.scaledFractional], >=, literal[0.5d]]] begin[{]
if[binary_operation[member[.scaledFractional], ==, literal[0.5d]]] begin[{]
assign[member[.roundItUp], call[.exactRoundUp, parameter[member[.exactFractionalPart], member[.fractionalPartAsInt]]]]
else begin[{]
assign[member[.roundItUp], literal[true]]
end[}]
if[member[.roundItUp]] begin[{]
if[binary_operation[member[.fractionalPartAsInt], <, member[fastPathData.fractionalMaxIntBound]]] begin[{]
member[.fractionalPartAsInt]
else begin[{]
assign[member[.fractionalPartAsInt], literal[0]]
member[.integralPartAsInt]
end[}]
else begin[{]
None
end[}]
else begin[{]
None
end[}]
call[.collectFractionalDigits, parameter[member[.fractionalPartAsInt], member[.container], member[fastPathData.fractionalFirstIndex]]]
call[.collectIntegralDigits, parameter[member[.integralPartAsInt], member[.container], member[fastPathData.integralLastIndex]]]
if[binary_operation[member[fastPathData.zeroDelta], !=, literal[0]]] begin[{]
call[.localizeDigits, parameter[member[.container]]]
else begin[{]
None
end[}]
if[member[.negative]] begin[{]
if[member[fastPathData.negativeAffixesRequired]] begin[{]
call[.addAffixes, parameter[member[.container], member[fastPathData.charsNegativePrefix], member[fastPathData.charsNegativeSuffix]]]
else begin[{]
None
end[}]
else begin[{]
if[member[fastPathData.positiveAffixesRequired]] begin[{]
call[.addAffixes, parameter[member[.container], member[fastPathData.charsPositivePrefix], member[fastPathData.charsPositiveSuffix]]]
else begin[{]
None
end[}]
end[}]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[fastDoubleFormat] operator[SEP] Keyword[double] identifier[d] , Keyword[boolean] identifier[negative] operator[SEP] {
Keyword[char] operator[SEP] operator[SEP] identifier[container] operator[=] identifier[fastPathData] operator[SEP] identifier[fastPathContainer] operator[SEP] Keyword[int] identifier[integralPartAsInt] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[d] operator[SEP] Keyword[double] identifier[exactFractionalPart] operator[=] identifier[d] operator[-] operator[SEP] Keyword[double] operator[SEP] identifier[integralPartAsInt] operator[SEP] Keyword[double] identifier[scaledFractional] operator[=] identifier[exactFractionalPart] operator[*] identifier[fastPathData] operator[SEP] identifier[fractionalScaleFactor] operator[SEP] Keyword[int] identifier[fractionalPartAsInt] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[scaledFractional] operator[SEP] identifier[scaledFractional] operator[=] identifier[scaledFractional] operator[-] operator[SEP] Keyword[double] operator[SEP] identifier[fractionalPartAsInt] operator[SEP] Keyword[boolean] identifier[roundItUp] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[scaledFractional] operator[>=] literal[Float] operator[SEP] {
Keyword[if] operator[SEP] identifier[scaledFractional] operator[==] literal[Float] operator[SEP] identifier[roundItUp] operator[=] identifier[exactRoundUp] operator[SEP] identifier[exactFractionalPart] , identifier[fractionalPartAsInt] operator[SEP] operator[SEP] Keyword[else] identifier[roundItUp] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[roundItUp] operator[SEP] {
Keyword[if] operator[SEP] identifier[fractionalPartAsInt] operator[<] identifier[fastPathData] operator[SEP] identifier[fractionalMaxIntBound] operator[SEP] {
identifier[fractionalPartAsInt] operator[++] operator[SEP]
}
Keyword[else] {
identifier[fractionalPartAsInt] operator[=] Other[0] operator[SEP] identifier[integralPartAsInt] operator[++] operator[SEP]
}
}
}
identifier[collectFractionalDigits] operator[SEP] identifier[fractionalPartAsInt] , identifier[container] , identifier[fastPathData] operator[SEP] identifier[fractionalFirstIndex] operator[SEP] operator[SEP] identifier[collectIntegralDigits] operator[SEP] identifier[integralPartAsInt] , identifier[container] , identifier[fastPathData] operator[SEP] identifier[integralLastIndex] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fastPathData] operator[SEP] identifier[zeroDelta] operator[!=] Other[0] operator[SEP] identifier[localizeDigits] operator[SEP] identifier[container] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[negative] operator[SEP] {
Keyword[if] operator[SEP] identifier[fastPathData] operator[SEP] identifier[negativeAffixesRequired] operator[SEP] identifier[addAffixes] operator[SEP] identifier[container] , identifier[fastPathData] operator[SEP] identifier[charsNegativePrefix] , identifier[fastPathData] operator[SEP] identifier[charsNegativeSuffix] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[fastPathData] operator[SEP] identifier[positiveAffixesRequired] operator[SEP] identifier[addAffixes] operator[SEP] identifier[container] , identifier[fastPathData] operator[SEP] identifier[charsPositivePrefix] , identifier[fastPathData] operator[SEP] identifier[charsPositiveSuffix] operator[SEP] operator[SEP]
}
|
protected void updateForNewConfiguration(CmsGitConfiguration gitConfig) {
if (!m_checkinBean.setCurrentConfiguration(gitConfig)) {
Notification.show(
CmsVaadinUtils.getMessageText(Messages.GUI_GIT_CONFIGURATION_SWITCH_FAILED_0),
CmsVaadinUtils.getMessageText(Messages.GUI_GIT_CONFIGURATION_SWITCH_FAILED_DESC_0),
Type.ERROR_MESSAGE);
m_configurationSelector.select(m_checkinBean.getCurrentConfiguration());
return;
}
resetSelectableModules();
for (final String moduleName : gitConfig.getConfiguredModules()) {
addSelectableModule(moduleName);
}
updateNewModuleSelector();
m_pullFirst.setValue(Boolean.valueOf(gitConfig.getDefaultAutoPullBefore()));
m_pullAfterCommit.setValue(Boolean.valueOf(gitConfig.getDefaultAutoPullAfter()));
m_addAndCommit.setValue(Boolean.valueOf(gitConfig.getDefaultAutoCommit()));
m_pushAutomatically.setValue(Boolean.valueOf(gitConfig.getDefaultAutoPush()));
m_commitMessage.setValue(Strings.nullToEmpty(gitConfig.getDefaultCommitMessage()));
m_copyAndUnzip.setValue(Boolean.valueOf(gitConfig.getDefaultCopyAndUnzip()));
m_excludeLib.setValue(Boolean.valueOf(gitConfig.getDefaultExcludeLibs()));
m_ignoreUnclean.setValue(Boolean.valueOf(gitConfig.getDefaultIngoreUnclean()));
m_userField.setValue(Strings.nullToEmpty(gitConfig.getDefaultGitUserName()));
m_emailField.setValue(Strings.nullToEmpty(gitConfig.getDefaultGitUserEmail()));
} | class class_name[name] begin[{]
method[updateForNewConfiguration, return_type[void], modifier[protected], parameter[gitConfig]] begin[{]
if[call[m_checkinBean.setCurrentConfiguration, parameter[member[.gitConfig]]]] begin[{]
call[Notification.show, parameter[call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_GIT_CONFIGURATION_SWITCH_FAILED_0]]], call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_GIT_CONFIGURATION_SWITCH_FAILED_DESC_0]]], member[Type.ERROR_MESSAGE]]]
call[m_configurationSelector.select, parameter[call[m_checkinBean.getCurrentConfiguration, parameter[]]]]
return[None]
else begin[{]
None
end[}]
call[.resetSelectableModules, parameter[]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=moduleName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addSelectableModule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getConfiguredModules, postfix_operators=[], prefix_operators=[], qualifier=gitConfig, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=moduleName)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)
call[.updateNewModuleSelector, parameter[]]
call[m_pullFirst.setValue, parameter[call[Boolean.valueOf, parameter[call[gitConfig.getDefaultAutoPullBefore, parameter[]]]]]]
call[m_pullAfterCommit.setValue, parameter[call[Boolean.valueOf, parameter[call[gitConfig.getDefaultAutoPullAfter, parameter[]]]]]]
call[m_addAndCommit.setValue, parameter[call[Boolean.valueOf, parameter[call[gitConfig.getDefaultAutoCommit, parameter[]]]]]]
call[m_pushAutomatically.setValue, parameter[call[Boolean.valueOf, parameter[call[gitConfig.getDefaultAutoPush, parameter[]]]]]]
call[m_commitMessage.setValue, parameter[call[Strings.nullToEmpty, parameter[call[gitConfig.getDefaultCommitMessage, parameter[]]]]]]
call[m_copyAndUnzip.setValue, parameter[call[Boolean.valueOf, parameter[call[gitConfig.getDefaultCopyAndUnzip, parameter[]]]]]]
call[m_excludeLib.setValue, parameter[call[Boolean.valueOf, parameter[call[gitConfig.getDefaultExcludeLibs, parameter[]]]]]]
call[m_ignoreUnclean.setValue, parameter[call[Boolean.valueOf, parameter[call[gitConfig.getDefaultIngoreUnclean, parameter[]]]]]]
call[m_userField.setValue, parameter[call[Strings.nullToEmpty, parameter[call[gitConfig.getDefaultGitUserName, parameter[]]]]]]
call[m_emailField.setValue, parameter[call[Strings.nullToEmpty, parameter[call[gitConfig.getDefaultGitUserEmail, parameter[]]]]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[updateForNewConfiguration] operator[SEP] identifier[CmsGitConfiguration] identifier[gitConfig] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[m_checkinBean] operator[SEP] identifier[setCurrentConfiguration] operator[SEP] identifier[gitConfig] operator[SEP] operator[SEP] {
identifier[Notification] operator[SEP] identifier[show] operator[SEP] identifier[CmsVaadinUtils] operator[SEP] identifier[getMessageText] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_GIT_CONFIGURATION_SWITCH_FAILED_0] operator[SEP] , identifier[CmsVaadinUtils] operator[SEP] identifier[getMessageText] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_GIT_CONFIGURATION_SWITCH_FAILED_DESC_0] operator[SEP] , identifier[Type] operator[SEP] identifier[ERROR_MESSAGE] operator[SEP] operator[SEP] identifier[m_configurationSelector] operator[SEP] identifier[select] operator[SEP] identifier[m_checkinBean] operator[SEP] identifier[getCurrentConfiguration] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP]
}
identifier[resetSelectableModules] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[moduleName] operator[:] identifier[gitConfig] operator[SEP] identifier[getConfiguredModules] operator[SEP] operator[SEP] operator[SEP] {
identifier[addSelectableModule] operator[SEP] identifier[moduleName] operator[SEP] operator[SEP]
}
identifier[updateNewModuleSelector] operator[SEP] operator[SEP] operator[SEP] identifier[m_pullFirst] operator[SEP] identifier[setValue] operator[SEP] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[gitConfig] operator[SEP] identifier[getDefaultAutoPullBefore] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_pullAfterCommit] operator[SEP] identifier[setValue] operator[SEP] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[gitConfig] operator[SEP] identifier[getDefaultAutoPullAfter] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_addAndCommit] operator[SEP] identifier[setValue] operator[SEP] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[gitConfig] operator[SEP] identifier[getDefaultAutoCommit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_pushAutomatically] operator[SEP] identifier[setValue] operator[SEP] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[gitConfig] operator[SEP] identifier[getDefaultAutoPush] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_commitMessage] operator[SEP] identifier[setValue] operator[SEP] identifier[Strings] operator[SEP] identifier[nullToEmpty] operator[SEP] identifier[gitConfig] operator[SEP] identifier[getDefaultCommitMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_copyAndUnzip] operator[SEP] identifier[setValue] operator[SEP] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[gitConfig] operator[SEP] identifier[getDefaultCopyAndUnzip] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_excludeLib] operator[SEP] identifier[setValue] operator[SEP] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[gitConfig] operator[SEP] identifier[getDefaultExcludeLibs] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_ignoreUnclean] operator[SEP] identifier[setValue] operator[SEP] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[gitConfig] operator[SEP] identifier[getDefaultIngoreUnclean] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_userField] operator[SEP] identifier[setValue] operator[SEP] identifier[Strings] operator[SEP] identifier[nullToEmpty] operator[SEP] identifier[gitConfig] operator[SEP] identifier[getDefaultGitUserName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_emailField] operator[SEP] identifier[setValue] operator[SEP] identifier[Strings] operator[SEP] identifier[nullToEmpty] operator[SEP] identifier[gitConfig] operator[SEP] identifier[getDefaultGitUserEmail] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
|
public Map<Integer, List<Row>> createTimeEntryMap(List<Row> rows)
{
Map<Integer, List<Row>> map = new HashMap<Integer, List<Row>>();
for (Row row : rows)
{
Integer workPatternID = row.getInteger("TIME_ENTRYID");
List<Row> list = map.get(workPatternID);
if (list == null)
{
list = new LinkedList<Row>();
map.put(workPatternID, list);
}
list.add(row);
}
return map;
} | class class_name[name] begin[{]
method[createTimeEntryMap, return_type[type[Map]], modifier[public], parameter[rows]] begin[{]
local_variable[type[Map], map]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TIME_ENTRYID")], member=getInteger, postfix_operators=[], prefix_operators=[], qualifier=row, selectors=[], type_arguments=None), name=workPatternID)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=workPatternID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), name=list)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Row, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=list, 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=None, dimensions=[], name=Row, sub_type=None))], dimensions=None, name=LinkedList, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=workPatternID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=rows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=row)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Row, sub_type=None))), label=None)
return[member[.map]]
end[}]
END[}] | Keyword[public] identifier[Map] operator[<] identifier[Integer] , identifier[List] operator[<] identifier[Row] operator[>] operator[>] identifier[createTimeEntryMap] operator[SEP] identifier[List] operator[<] identifier[Row] operator[>] identifier[rows] operator[SEP] {
identifier[Map] operator[<] identifier[Integer] , identifier[List] operator[<] identifier[Row] operator[>] operator[>] identifier[map] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[Integer] , identifier[List] operator[<] identifier[Row] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Row] identifier[row] operator[:] identifier[rows] operator[SEP] {
identifier[Integer] identifier[workPatternID] operator[=] identifier[row] operator[SEP] identifier[getInteger] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Row] operator[>] identifier[list] operator[=] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[workPatternID] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[list] operator[==] Other[null] operator[SEP] {
identifier[list] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[Row] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[workPatternID] , identifier[list] operator[SEP] operator[SEP]
}
identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[row] operator[SEP] operator[SEP]
}
Keyword[return] identifier[map] operator[SEP]
}
|
private static final void checkTempDirs(final String[] tempDirs) throws Exception {
for (int i = 0; i < tempDirs.length; ++i) {
final String dir = tempDirs[i];
if (dir == null) {
throw new Exception("Temporary file directory #" + (i + 1) + " is null.");
}
final File f = new File(dir);
if (!f.exists()) {
throw new Exception("Temporary file directory '" + f.getAbsolutePath() + "' does not exist.");
}
if (!f.isDirectory()) {
throw new Exception("Temporary file directory '" + f.getAbsolutePath() + "' is not a directory.");
}
if (!f.canWrite()) {
throw new Exception("Temporary file directory '" + f.getAbsolutePath() + "' is not writable.");
}
}
} | class class_name[name] begin[{]
method[checkTempDirs, return_type[void], modifier[final private static], parameter[tempDirs]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=tempDirs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=dir)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=dir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Temporary file directory #"), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is null."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=dir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), name=f)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=['!'], qualifier=f, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Temporary file directory '"), operandr=MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' does not exist."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isDirectory, postfix_operators=[], prefix_operators=['!'], qualifier=f, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Temporary file directory '"), operandr=MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is not a directory."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=canWrite, postfix_operators=[], prefix_operators=['!'], qualifier=f, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Temporary file directory '"), operandr=MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is not writable."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=tempDirs, 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[static] Keyword[final] Keyword[void] identifier[checkTempDirs] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[tempDirs] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[tempDirs] operator[SEP] identifier[length] operator[SEP] operator[++] identifier[i] operator[SEP] {
Keyword[final] identifier[String] identifier[dir] operator[=] identifier[tempDirs] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dir] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[+] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP]
}
Keyword[final] identifier[File] identifier[f] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[dir] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[f] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[+] identifier[f] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] operator[!] identifier[f] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[+] identifier[f] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] operator[!] identifier[f] operator[SEP] identifier[canWrite] operator[SEP] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[+] identifier[f] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP]
}
}
}
|
@BetaApi
public final ListInstancesRegionInstanceGroupsPagedResponse listInstancesRegionInstanceGroups(
String instanceGroup,
RegionInstanceGroupsListInstancesRequest regionInstanceGroupsListInstancesRequestResource) {
ListInstancesRegionInstanceGroupsHttpRequest request =
ListInstancesRegionInstanceGroupsHttpRequest.newBuilder()
.setInstanceGroup(instanceGroup)
.setRegionInstanceGroupsListInstancesRequestResource(
regionInstanceGroupsListInstancesRequestResource)
.build();
return listInstancesRegionInstanceGroups(request);
} | class class_name[name] begin[{]
method[listInstancesRegionInstanceGroups, return_type[type[ListInstancesRegionInstanceGroupsPagedResponse]], modifier[final public], parameter[instanceGroup, regionInstanceGroupsListInstancesRequestResource]] begin[{]
local_variable[type[ListInstancesRegionInstanceGroupsHttpRequest], request]
return[call[.listInstancesRegionInstanceGroups, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[ListInstancesRegionInstanceGroupsPagedResponse] identifier[listInstancesRegionInstanceGroups] operator[SEP] identifier[String] identifier[instanceGroup] , identifier[RegionInstanceGroupsListInstancesRequest] identifier[regionInstanceGroupsListInstancesRequestResource] operator[SEP] {
identifier[ListInstancesRegionInstanceGroupsHttpRequest] identifier[request] operator[=] identifier[ListInstancesRegionInstanceGroupsHttpRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setInstanceGroup] operator[SEP] identifier[instanceGroup] operator[SEP] operator[SEP] identifier[setRegionInstanceGroupsListInstancesRequestResource] operator[SEP] identifier[regionInstanceGroupsListInstancesRequestResource] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[listInstancesRegionInstanceGroups] operator[SEP] identifier[request] operator[SEP] operator[SEP]
}
|
protected SofaRouteException unavailableProviderException(String serviceKey, String providerInfo) {
return new SofaRouteException(LogCodes.getLog(LogCodes.ERROR_TARGET_URL_INVALID, serviceKey, providerInfo));
} | class class_name[name] begin[{]
method[unavailableProviderException, return_type[type[SofaRouteException]], modifier[protected], parameter[serviceKey, providerInfo]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=ERROR_TARGET_URL_INVALID, postfix_operators=[], prefix_operators=[], qualifier=LogCodes, selectors=[]), MemberReference(member=serviceKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=providerInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=LogCodes, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SofaRouteException, sub_type=None))]
end[}]
END[}] | Keyword[protected] identifier[SofaRouteException] identifier[unavailableProviderException] operator[SEP] identifier[String] identifier[serviceKey] , identifier[String] identifier[providerInfo] operator[SEP] {
Keyword[return] Keyword[new] identifier[SofaRouteException] operator[SEP] identifier[LogCodes] operator[SEP] identifier[getLog] operator[SEP] identifier[LogCodes] operator[SEP] identifier[ERROR_TARGET_URL_INVALID] , identifier[serviceKey] , identifier[providerInfo] operator[SEP] operator[SEP] operator[SEP]
}
|
public void removeLine (final Line aLine)
{
if (aLine.m_aPrevious == null)
m_aLines = aLine.m_aNext;
else
aLine.m_aPrevious.m_aNext = aLine.m_aNext;
if (aLine.m_aNext == null)
m_aLineTail = aLine.m_aPrevious;
else
aLine.m_aNext.m_aPrevious = aLine.m_aPrevious;
aLine.m_aPrevious = null;
aLine.m_aNext = null;
} | class class_name[name] begin[{]
method[removeLine, return_type[void], modifier[public], parameter[aLine]] begin[{]
if[binary_operation[member[aLine.m_aPrevious], ==, literal[null]]] begin[{]
assign[member[.m_aLines], member[aLine.m_aNext]]
else begin[{]
assign[member[aLine.m_aPrevious.m_aNext], member[aLine.m_aNext]]
end[}]
if[binary_operation[member[aLine.m_aNext], ==, literal[null]]] begin[{]
assign[member[.m_aLineTail], member[aLine.m_aPrevious]]
else begin[{]
assign[member[aLine.m_aNext.m_aPrevious], member[aLine.m_aPrevious]]
end[}]
assign[member[aLine.m_aPrevious], literal[null]]
assign[member[aLine.m_aNext], literal[null]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[removeLine] operator[SEP] Keyword[final] identifier[Line] identifier[aLine] operator[SEP] {
Keyword[if] operator[SEP] identifier[aLine] operator[SEP] identifier[m_aPrevious] operator[==] Other[null] operator[SEP] identifier[m_aLines] operator[=] identifier[aLine] operator[SEP] identifier[m_aNext] operator[SEP] Keyword[else] identifier[aLine] operator[SEP] identifier[m_aPrevious] operator[SEP] identifier[m_aNext] operator[=] identifier[aLine] operator[SEP] identifier[m_aNext] operator[SEP] Keyword[if] operator[SEP] identifier[aLine] operator[SEP] identifier[m_aNext] operator[==] Other[null] operator[SEP] identifier[m_aLineTail] operator[=] identifier[aLine] operator[SEP] identifier[m_aPrevious] operator[SEP] Keyword[else] identifier[aLine] operator[SEP] identifier[m_aNext] operator[SEP] identifier[m_aPrevious] operator[=] identifier[aLine] operator[SEP] identifier[m_aPrevious] operator[SEP] identifier[aLine] operator[SEP] identifier[m_aPrevious] operator[=] Other[null] operator[SEP] identifier[aLine] operator[SEP] identifier[m_aNext] operator[=] Other[null] operator[SEP]
}
|
public Optional<String> getLabel(final Object targetObj) {
ArgUtils.notNull(targetObj, "targetObj");
return labelGetter.map(getter -> getter.get(targetObj)).orElse(Optional.empty());
} | class class_name[name] begin[{]
method[getLabel, return_type[type[Optional]], modifier[public], parameter[targetObj]] begin[{]
call[ArgUtils.notNull, parameter[member[.targetObj], literal["targetObj"]]]
return[call[labelGetter.map, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=targetObj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=getter, selectors=[], type_arguments=None), parameters=[MemberReference(member=getter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]]
end[}]
END[}] | Keyword[public] identifier[Optional] operator[<] identifier[String] operator[>] identifier[getLabel] operator[SEP] Keyword[final] identifier[Object] identifier[targetObj] operator[SEP] {
identifier[ArgUtils] operator[SEP] identifier[notNull] operator[SEP] identifier[targetObj] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[labelGetter] operator[SEP] identifier[map] operator[SEP] identifier[getter] operator[->] identifier[getter] operator[SEP] identifier[get] operator[SEP] identifier[targetObj] operator[SEP] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
|
public final EObject ruleEnumLiterals() throws RecognitionException {
EObject current = null;
Token otherlv_2=null;
EObject this_EnumLiteralDeclaration_0 = null;
EObject lv_elements_3_0 = null;
enterRule();
try {
// InternalXtext.g:3652:2: ( (this_EnumLiteralDeclaration_0= ruleEnumLiteralDeclaration ( () (otherlv_2= '|' ( (lv_elements_3_0= ruleEnumLiteralDeclaration ) ) )+ )? ) )
// InternalXtext.g:3653:2: (this_EnumLiteralDeclaration_0= ruleEnumLiteralDeclaration ( () (otherlv_2= '|' ( (lv_elements_3_0= ruleEnumLiteralDeclaration ) ) )+ )? )
{
// InternalXtext.g:3653:2: (this_EnumLiteralDeclaration_0= ruleEnumLiteralDeclaration ( () (otherlv_2= '|' ( (lv_elements_3_0= ruleEnumLiteralDeclaration ) ) )+ )? )
// InternalXtext.g:3654:3: this_EnumLiteralDeclaration_0= ruleEnumLiteralDeclaration ( () (otherlv_2= '|' ( (lv_elements_3_0= ruleEnumLiteralDeclaration ) ) )+ )?
{
newCompositeNode(grammarAccess.getEnumLiteralsAccess().getEnumLiteralDeclarationParserRuleCall_0());
pushFollow(FollowSets000.FOLLOW_25);
this_EnumLiteralDeclaration_0=ruleEnumLiteralDeclaration();
state._fsp--;
current = this_EnumLiteralDeclaration_0;
afterParserOrEnumRuleCall();
// InternalXtext.g:3662:3: ( () (otherlv_2= '|' ( (lv_elements_3_0= ruleEnumLiteralDeclaration ) ) )+ )?
int alt77=2;
int LA77_0 = input.LA(1);
if ( (LA77_0==30) ) {
alt77=1;
}
switch (alt77) {
case 1 :
// InternalXtext.g:3663:4: () (otherlv_2= '|' ( (lv_elements_3_0= ruleEnumLiteralDeclaration ) ) )+
{
// InternalXtext.g:3663:4: ()
// InternalXtext.g:3664:5:
{
current = forceCreateModelElementAndAdd(
grammarAccess.getEnumLiteralsAccess().getAlternativesElementsAction_1_0(),
current);
}
// InternalXtext.g:3670:4: (otherlv_2= '|' ( (lv_elements_3_0= ruleEnumLiteralDeclaration ) ) )+
int cnt76=0;
loop76:
do {
int alt76=2;
int LA76_0 = input.LA(1);
if ( (LA76_0==30) ) {
alt76=1;
}
switch (alt76) {
case 1 :
// InternalXtext.g:3671:5: otherlv_2= '|' ( (lv_elements_3_0= ruleEnumLiteralDeclaration ) )
{
otherlv_2=(Token)match(input,30,FollowSets000.FOLLOW_13);
newLeafNode(otherlv_2, grammarAccess.getEnumLiteralsAccess().getVerticalLineKeyword_1_1_0());
// InternalXtext.g:3675:5: ( (lv_elements_3_0= ruleEnumLiteralDeclaration ) )
// InternalXtext.g:3676:6: (lv_elements_3_0= ruleEnumLiteralDeclaration )
{
// InternalXtext.g:3676:6: (lv_elements_3_0= ruleEnumLiteralDeclaration )
// InternalXtext.g:3677:7: lv_elements_3_0= ruleEnumLiteralDeclaration
{
newCompositeNode(grammarAccess.getEnumLiteralsAccess().getElementsEnumLiteralDeclarationParserRuleCall_1_1_1_0());
pushFollow(FollowSets000.FOLLOW_25);
lv_elements_3_0=ruleEnumLiteralDeclaration();
state._fsp--;
if (current==null) {
current = createModelElementForParent(grammarAccess.getEnumLiteralsRule());
}
add(
current,
"elements",
lv_elements_3_0,
"org.eclipse.xtext.Xtext.EnumLiteralDeclaration");
afterParserOrEnumRuleCall();
}
}
}
break;
default :
if ( cnt76 >= 1 ) break loop76;
EarlyExitException eee =
new EarlyExitException(76, input);
throw eee;
}
cnt76++;
} while (true);
}
break;
}
}
}
leaveRule();
}
catch (RecognitionException re) {
recover(input,re);
appendSkippedTokens();
}
finally {
}
return current;
} | class class_name[name] begin[{]
method[ruleEnumLiterals, return_type[type[EObject]], modifier[final public], parameter[]] begin[{]
local_variable[type[EObject], current]
local_variable[type[Token], otherlv_2]
local_variable[type[EObject], this_EnumLiteralDeclaration_0]
local_variable[type[EObject], lv_elements_3_0]
call[.enterRule, parameter[]]
TryStatement(block=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEnumLiteralsAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getEnumLiteralDeclarationParserRuleCall_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_25, postfix_operators=[], prefix_operators=[], qualifier=FollowSets000, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=this_EnumLiteralDeclaration_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleEnumLiteralDeclaration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=this_EnumLiteralDeclaration_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt77)], 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=LA77_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA77_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt77, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEnumLiteralsAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getAlternativesElementsAction_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forceCreateModelElementAndAdd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=cnt76)], modifiers=set(), type=BasicType(dimensions=[], name=int)), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt76)], 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=LA76_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA76_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt76, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherlv_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30), MemberReference(member=FOLLOW_13, postfix_operators=[], prefix_operators=[], qualifier=FollowSets000, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=otherlv_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getEnumLiteralsAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getVerticalLineKeyword_1_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEnumLiteralsAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getElementsEnumLiteralDeclarationParserRuleCall_1_1_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_25, postfix_operators=[], prefix_operators=[], qualifier=FollowSets000, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_elements_3_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleEnumLiteralDeclaration, 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=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEnumLiteralsRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElementForParent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="elements"), MemberReference(member=lv_elements_3_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtext.Xtext.EnumLiteralDeclaration")], member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])])]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cnt76, 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=BreakStatement(goto=loop76, label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=76), 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=EarlyExitException, sub_type=None)), name=eee)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EarlyExitException, sub_type=None)), ThrowStatement(expression=MemberReference(member=eee, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])], expression=MemberReference(member=alt76, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MemberReference(member=cnt76, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop76)]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt77, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])]), StatementExpression(expression=MethodInvocation(arguments=[], member=leaveRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=appendSkippedTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None)
return[member[.current]]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[EObject] identifier[ruleEnumLiterals] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_2] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[this_EnumLiteralDeclaration_0] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[lv_elements_3_0] operator[=] Other[null] operator[SEP] identifier[enterRule] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
{
{
identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getEnumLiteralsAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getEnumLiteralDeclarationParserRuleCall_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pushFollow] operator[SEP] identifier[FollowSets000] operator[SEP] identifier[FOLLOW_25] operator[SEP] operator[SEP] identifier[this_EnumLiteralDeclaration_0] operator[=] identifier[ruleEnumLiteralDeclaration] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] identifier[current] operator[=] identifier[this_EnumLiteralDeclaration_0] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[alt77] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA77_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA77_0] operator[==] Other[30] operator[SEP] operator[SEP] {
identifier[alt77] operator[=] Other[1] operator[SEP]
}
Keyword[switch] operator[SEP] identifier[alt77] operator[SEP] {
Keyword[case] Other[1] operator[:] {
{
identifier[current] operator[=] identifier[forceCreateModelElementAndAdd] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getEnumLiteralsAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getAlternativesElementsAction_1_0] operator[SEP] operator[SEP] , identifier[current] operator[SEP] operator[SEP]
}
Keyword[int] identifier[cnt76] operator[=] Other[0] operator[SEP] identifier[loop76] operator[:] Keyword[do] {
Keyword[int] identifier[alt76] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA76_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA76_0] operator[==] Other[30] operator[SEP] operator[SEP] {
identifier[alt76] operator[=] Other[1] operator[SEP]
}
Keyword[switch] operator[SEP] identifier[alt76] operator[SEP] {
Keyword[case] Other[1] operator[:] {
identifier[otherlv_2] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[30] , identifier[FollowSets000] operator[SEP] identifier[FOLLOW_13] operator[SEP] operator[SEP] identifier[newLeafNode] operator[SEP] identifier[otherlv_2] , identifier[grammarAccess] operator[SEP] identifier[getEnumLiteralsAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getVerticalLineKeyword_1_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
{
identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getEnumLiteralsAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getElementsEnumLiteralDeclarationParserRuleCall_1_1_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pushFollow] operator[SEP] identifier[FollowSets000] operator[SEP] identifier[FOLLOW_25] operator[SEP] operator[SEP] identifier[lv_elements_3_0] operator[=] identifier[ruleEnumLiteralDeclaration] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] {
identifier[current] operator[=] identifier[createModelElementForParent] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getEnumLiteralsRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
identifier[add] operator[SEP] identifier[current] , literal[String] , identifier[lv_elements_3_0] , literal[String] operator[SEP] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP]
}
}
}
Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[if] operator[SEP] identifier[cnt76] operator[>=] Other[1] operator[SEP] Keyword[break] identifier[loop76] operator[SEP] identifier[EarlyExitException] identifier[eee] operator[=] Keyword[new] identifier[EarlyExitException] operator[SEP] Other[76] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[eee] operator[SEP]
}
identifier[cnt76] operator[++] operator[SEP]
}
Keyword[while] operator[SEP] literal[boolean] operator[SEP] operator[SEP]
}
Keyword[break] operator[SEP]
}
}
}
identifier[leaveRule] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] {
identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[appendSkippedTokens] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[finally] {
}
Keyword[return] identifier[current] operator[SEP]
}
|
final public ThenExpressionBuilder<T> ifExp() {
return new ThenExpressionBuilder<T>(new ExpressionHandler<ThenBuilder<T>>() {
public ThenBuilder<T> handleExpression(final Expression e) {
return new ThenBuilder<T>(e, new IfStatementHandler<T>() {
public T handleStatement(IfStatement ifStatement) {
return statementHandler().handleStatement(ifStatement);
}
}, builder);
}
});
} | class class_name[name] begin[{]
method[ifExp, return_type[type[ThenExpressionBuilder]], modifier[final public], parameter[]] begin[{]
return[ClassCreator(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=statementHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=ifStatement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleStatement, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=handleStatement, parameters=[FormalParameter(annotations=[], modifiers=set(), name=ifStatement, type=ReferenceType(arguments=None, dimensions=[], name=IfStatement, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=IfStatementHandler, sub_type=None)), MemberReference(member=builder, 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=ThenBuilder, sub_type=None)), label=None)], documentation=None, modifiers={'public'}, name=handleExpression, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=e, type=ReferenceType(arguments=None, dimensions=[], name=Expression, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=ThenBuilder, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=ThenBuilder, sub_type=None))], dimensions=None, name=ExpressionHandler, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=ThenExpressionBuilder, sub_type=None))]
end[}]
END[}] | Keyword[final] Keyword[public] identifier[ThenExpressionBuilder] operator[<] identifier[T] operator[>] identifier[ifExp] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[ThenExpressionBuilder] operator[<] identifier[T] operator[>] operator[SEP] Keyword[new] identifier[ExpressionHandler] operator[<] identifier[ThenBuilder] operator[<] identifier[T] operator[>] operator[>] operator[SEP] operator[SEP] {
Keyword[public] identifier[ThenBuilder] operator[<] identifier[T] operator[>] identifier[handleExpression] operator[SEP] Keyword[final] identifier[Expression] identifier[e] operator[SEP] {
Keyword[return] Keyword[new] identifier[ThenBuilder] operator[<] identifier[T] operator[>] operator[SEP] identifier[e] , Keyword[new] identifier[IfStatementHandler] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] {
Keyword[public] identifier[T] identifier[handleStatement] operator[SEP] identifier[IfStatement] identifier[ifStatement] operator[SEP] {
Keyword[return] identifier[statementHandler] operator[SEP] operator[SEP] operator[SEP] identifier[handleStatement] operator[SEP] identifier[ifStatement] operator[SEP] operator[SEP]
}
} , identifier[builder] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP]
}
|
public List<LocationInner> listLocations(String subscriptionId) {
return listLocationsWithServiceResponseAsync(subscriptionId).toBlocking().single().body();
} | class class_name[name] begin[{]
method[listLocations, return_type[type[List]], modifier[public], parameter[subscriptionId]] begin[{]
return[call[.listLocationsWithServiceResponseAsync, parameter[member[.subscriptionId]]]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[LocationInner] operator[>] identifier[listLocations] operator[SEP] identifier[String] identifier[subscriptionId] operator[SEP] {
Keyword[return] identifier[listLocationsWithServiceResponseAsync] operator[SEP] identifier[subscriptionId] 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 findCandidateSubsForWildcardExpr(String topicExpression,
String topicStem,
Set consumerSet)
throws SIDiscriminatorSyntaxException
{
if (tc.isEntryEnabled())
SibTr.entry(
tc,
"findCandidateSubsForWildcardExpr",
new Object[] { topicExpression, topicStem});
// Inspect non-wildcarded and non-selector consumers
if(_areExactNonSelectorSubs)
{
// Use MatchSpace direct evaluation code once we've isolated candidate
// expressions through string matching
evaluateCandidateExpression(topicExpression,
_exactNonSelectorSubs,
topicStem,
consumerSet);
}
// Inspect non-wildcarded, selector consumers
if(_areExactSelectorSubs)
{
// Use MatchSpace direct evaluation code once we've isolated candidate
// expressions through string matching
evaluateCandidateExpression(topicExpression,
_exactSelectorSubs,
topicStem,
consumerSet);
}
// Inspect wildcarded and non-selector consumers
if(_areWildcardNonSelectorSubs)
{
// Use string matching
isolateCandidateWildcardSubs(topicExpression,
topicStem,
_wildcardNonSelectorSubs,
consumerSet);
}
// Inspect wildcarded and selector consumers
if(_areWildcardSelectorSubs)
{
// Use string matching
isolateCandidateWildcardSubs(topicExpression,
topicStem,
_wildcardSelectorSubs,
consumerSet);
}
if (tc.isEntryEnabled())
SibTr.exit(tc, "findCandidateSubsForWildcardExpr");
} | class class_name[name] begin[{]
method[findCandidateSubsForWildcardExpr, return_type[void], modifier[public], parameter[topicExpression, topicStem, consumerSet]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[SibTr.entry, parameter[member[.tc], literal["findCandidateSubsForWildcardExpr"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=topicExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=topicStem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]]
else begin[{]
None
end[}]
if[member[._areExactNonSelectorSubs]] begin[{]
call[.evaluateCandidateExpression, parameter[member[.topicExpression], member[._exactNonSelectorSubs], member[.topicStem], member[.consumerSet]]]
else begin[{]
None
end[}]
if[member[._areExactSelectorSubs]] begin[{]
call[.evaluateCandidateExpression, parameter[member[.topicExpression], member[._exactSelectorSubs], member[.topicStem], member[.consumerSet]]]
else begin[{]
None
end[}]
if[member[._areWildcardNonSelectorSubs]] begin[{]
call[.isolateCandidateWildcardSubs, parameter[member[.topicExpression], member[.topicStem], member[._wildcardNonSelectorSubs], member[.consumerSet]]]
else begin[{]
None
end[}]
if[member[._areWildcardSelectorSubs]] begin[{]
call[.isolateCandidateWildcardSubs, parameter[member[.topicExpression], member[.topicStem], member[._wildcardSelectorSubs], member[.consumerSet]]]
else begin[{]
None
end[}]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[SibTr.exit, parameter[member[.tc], literal["findCandidateSubsForWildcardExpr"]]]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[findCandidateSubsForWildcardExpr] operator[SEP] identifier[String] identifier[topicExpression] , identifier[String] identifier[topicStem] , identifier[Set] identifier[consumerSet] operator[SEP] Keyword[throws] identifier[SIDiscriminatorSyntaxException] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] {
identifier[topicExpression] , identifier[topicStem]
} operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_areExactNonSelectorSubs] operator[SEP] {
identifier[evaluateCandidateExpression] operator[SEP] identifier[topicExpression] , identifier[_exactNonSelectorSubs] , identifier[topicStem] , identifier[consumerSet] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[_areExactSelectorSubs] operator[SEP] {
identifier[evaluateCandidateExpression] operator[SEP] identifier[topicExpression] , identifier[_exactSelectorSubs] , identifier[topicStem] , identifier[consumerSet] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[_areWildcardNonSelectorSubs] operator[SEP] {
identifier[isolateCandidateWildcardSubs] operator[SEP] identifier[topicExpression] , identifier[topicStem] , identifier[_wildcardNonSelectorSubs] , identifier[consumerSet] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[_areWildcardSelectorSubs] operator[SEP] {
identifier[isolateCandidateWildcardSubs] operator[SEP] identifier[topicExpression] , identifier[topicStem] , identifier[_wildcardSelectorSubs] , identifier[consumerSet] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP]
}
|
public static <T> T invoke(Object obj, String methodName, Object... args) throws UtilException {
final Method method = getMethodOfObj(obj, methodName, args);
if (null == method) {
throw new UtilException(StrUtil.format("No such method: [{}]", methodName));
}
return invoke(obj, method, args);
} | class class_name[name] begin[{]
method[invoke, return_type[type[T]], modifier[public static], parameter[obj, methodName, args]] begin[{]
local_variable[type[Method], method]
if[binary_operation[literal[null], ==, member[.method]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No such method: [{}]"), MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=StrUtil, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UtilException, sub_type=None)), label=None)
else begin[{]
None
end[}]
return[call[.invoke, parameter[member[.obj], member[.method], member[.args]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[invoke] operator[SEP] identifier[Object] identifier[obj] , identifier[String] identifier[methodName] , identifier[Object] operator[...] identifier[args] operator[SEP] Keyword[throws] identifier[UtilException] {
Keyword[final] identifier[Method] identifier[method] operator[=] identifier[getMethodOfObj] operator[SEP] identifier[obj] , identifier[methodName] , identifier[args] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[method] operator[SEP] {
Keyword[throw] Keyword[new] identifier[UtilException] operator[SEP] identifier[StrUtil] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[methodName] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] identifier[invoke] operator[SEP] identifier[obj] , identifier[method] , identifier[args] operator[SEP] operator[SEP]
}
|
public Datatype.Builder setBuilderFactory(Optional<? extends BuilderFactory> builderFactory) {
if (builderFactory.isPresent()) {
return setBuilderFactory(builderFactory.get());
} else {
return clearBuilderFactory();
}
} | class class_name[name] begin[{]
method[setBuilderFactory, return_type[type[Datatype]], modifier[public], parameter[builderFactory]] begin[{]
if[call[builderFactory.isPresent, parameter[]]] begin[{]
return[call[.setBuilderFactory, parameter[call[builderFactory.get, parameter[]]]]]
else begin[{]
return[call[.clearBuilderFactory, parameter[]]]
end[}]
end[}]
END[}] | Keyword[public] identifier[Datatype] operator[SEP] identifier[Builder] identifier[setBuilderFactory] operator[SEP] identifier[Optional] operator[<] operator[?] Keyword[extends] identifier[BuilderFactory] operator[>] identifier[builderFactory] operator[SEP] {
Keyword[if] operator[SEP] identifier[builderFactory] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[setBuilderFactory] operator[SEP] identifier[builderFactory] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[return] identifier[clearBuilderFactory] operator[SEP] operator[SEP] operator[SEP]
}
}
|
@AroundInvoke
public Object never(final InvocationContext context) throws Exception {
if (getUOWM().getUOWType() == UOWSynchronizationRegistry.UOW_TYPE_GLOBAL_TRANSACTION) {
throw new TransactionalException("TxType.NEVER method called within a global tx", new InvalidTransactionException());
}
return runUnderUOWNoEnablement(UOWSynchronizationRegistry.UOW_TYPE_LOCAL_TRANSACTION, true, context, "NEVER");
} | class class_name[name] begin[{]
method[never, return_type[type[Object]], modifier[public], parameter[context]] begin[{]
if[binary_operation[call[.getUOWM, parameter[]], ==, member[UOWSynchronizationRegistry.UOW_TYPE_GLOBAL_TRANSACTION]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TxType.NEVER method called within a global tx"), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidTransactionException, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TransactionalException, sub_type=None)), label=None)
else begin[{]
None
end[}]
return[call[.runUnderUOWNoEnablement, parameter[member[UOWSynchronizationRegistry.UOW_TYPE_LOCAL_TRANSACTION], literal[true], member[.context], literal["NEVER"]]]]
end[}]
END[}] | annotation[@] identifier[AroundInvoke] Keyword[public] identifier[Object] identifier[never] operator[SEP] Keyword[final] identifier[InvocationContext] identifier[context] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[if] operator[SEP] identifier[getUOWM] operator[SEP] operator[SEP] operator[SEP] identifier[getUOWType] operator[SEP] operator[SEP] operator[==] identifier[UOWSynchronizationRegistry] operator[SEP] identifier[UOW_TYPE_GLOBAL_TRANSACTION] operator[SEP] {
Keyword[throw] Keyword[new] identifier[TransactionalException] operator[SEP] literal[String] , Keyword[new] identifier[InvalidTransactionException] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] identifier[runUnderUOWNoEnablement] operator[SEP] identifier[UOWSynchronizationRegistry] operator[SEP] identifier[UOW_TYPE_LOCAL_TRANSACTION] , literal[boolean] , identifier[context] , literal[String] operator[SEP] operator[SEP]
}
|
private Collection<KeyReader> findReader(final Class<? extends Saga> sagaClazz, final Class<?> messageClazz) {
Saga saga = sagaProviderFactory.createProvider(sagaClazz).get();
Collection<KeyReader> readers = saga.keyReaders();
if (readers == null) {
// return empty list in case saga returns null for any reason
readers = new ArrayList<>();
}
return readers;
} | class class_name[name] begin[{]
method[findReader, return_type[type[Collection]], modifier[private], parameter[sagaClazz, messageClazz]] begin[{]
local_variable[type[Saga], saga]
local_variable[type[Collection], readers]
if[binary_operation[member[.readers], ==, literal[null]]] begin[{]
assign[member[.readers], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))]
else begin[{]
None
end[}]
return[member[.readers]]
end[}]
END[}] | Keyword[private] identifier[Collection] operator[<] identifier[KeyReader] operator[>] identifier[findReader] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Saga] operator[>] identifier[sagaClazz] , Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[messageClazz] operator[SEP] {
identifier[Saga] identifier[saga] operator[=] identifier[sagaProviderFactory] operator[SEP] identifier[createProvider] operator[SEP] identifier[sagaClazz] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[KeyReader] operator[>] identifier[readers] operator[=] identifier[saga] operator[SEP] identifier[keyReaders] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[readers] operator[==] Other[null] operator[SEP] {
identifier[readers] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] identifier[readers] operator[SEP]
}
|
Item set(final int type,
final String strVal1,
final String strVal2,
final String strVal3) {
this.type = type;
this.strVal1 = strVal1;
this.strVal2 = strVal2;
this.strVal3 = strVal3;
switch (type) {
case ClassWriter.UTF8:
case ClassWriter.STR:
case ClassWriter.CLASS:
hashCode = 0x7FFFFFFF & (type + strVal1.hashCode());
break;
case ClassWriter.NAME_TYPE:
hashCode = 0x7FFFFFFF & (type + strVal1.hashCode() * strVal2.hashCode());
break;
//case ClassWriter.FIELD:
//case ClassWriter.METH:
//case ClassWriter.IMETH:
default:
hashCode = 0x7FFFFFFF & (type
+ strVal1.hashCode() * strVal2.hashCode() * strVal3.hashCode());
}
return this;
} | class class_name[name] begin[{]
method[set, return_type[type[Item]], modifier[default], parameter[type, strVal1, strVal2, strVal3]] begin[{]
assign[THIS[member[None.type]], member[.type]]
assign[THIS[member[None.strVal1]], member[.strVal1]]
assign[THIS[member[None.strVal2]], member[.strVal2]]
assign[THIS[member[None.strVal3]], member[.strVal3]]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=UTF8, postfix_operators=[], prefix_operators=[], qualifier=ClassWriter, selectors=[]), MemberReference(member=STR, postfix_operators=[], prefix_operators=[], qualifier=ClassWriter, selectors=[]), MemberReference(member=CLASS, postfix_operators=[], prefix_operators=[], qualifier=ClassWriter, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=hashCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x7FFFFFFF), operandr=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=hashCode, postfix_operators=[], prefix_operators=[], qualifier=strVal1, selectors=[], type_arguments=None), operator=+), operator=&)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=NAME_TYPE, postfix_operators=[], prefix_operators=[], qualifier=ClassWriter, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=hashCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x7FFFFFFF), operandr=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=hashCode, postfix_operators=[], prefix_operators=[], qualifier=strVal1, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=hashCode, postfix_operators=[], prefix_operators=[], qualifier=strVal2, selectors=[], type_arguments=None), operator=*), operator=+), operator=&)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=hashCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x7FFFFFFF), operandr=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=hashCode, postfix_operators=[], prefix_operators=[], qualifier=strVal1, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=hashCode, postfix_operators=[], prefix_operators=[], qualifier=strVal2, selectors=[], type_arguments=None), operator=*), operandr=MethodInvocation(arguments=[], member=hashCode, postfix_operators=[], prefix_operators=[], qualifier=strVal3, selectors=[], type_arguments=None), operator=*), operator=+), operator=&)), label=None)])], expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)
return[THIS[]]
end[}]
END[}] | identifier[Item] identifier[set] operator[SEP] Keyword[final] Keyword[int] identifier[type] , Keyword[final] identifier[String] identifier[strVal1] , Keyword[final] identifier[String] identifier[strVal2] , Keyword[final] identifier[String] identifier[strVal3] operator[SEP] {
Keyword[this] operator[SEP] identifier[type] operator[=] identifier[type] operator[SEP] Keyword[this] operator[SEP] identifier[strVal1] operator[=] identifier[strVal1] operator[SEP] Keyword[this] operator[SEP] identifier[strVal2] operator[=] identifier[strVal2] operator[SEP] Keyword[this] operator[SEP] identifier[strVal3] operator[=] identifier[strVal3] operator[SEP] Keyword[switch] operator[SEP] identifier[type] operator[SEP] {
Keyword[case] identifier[ClassWriter] operator[SEP] identifier[UTF8] operator[:] Keyword[case] identifier[ClassWriter] operator[SEP] identifier[STR] operator[:] Keyword[case] identifier[ClassWriter] operator[SEP] identifier[CLASS] operator[:] identifier[hashCode] operator[=] literal[Integer] operator[&] operator[SEP] identifier[type] operator[+] identifier[strVal1] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[ClassWriter] operator[SEP] identifier[NAME_TYPE] operator[:] identifier[hashCode] operator[=] literal[Integer] operator[&] operator[SEP] identifier[type] operator[+] identifier[strVal1] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[*] identifier[strVal2] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[hashCode] operator[=] literal[Integer] operator[&] operator[SEP] identifier[type] operator[+] identifier[strVal1] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[*] identifier[strVal2] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[*] identifier[strVal3] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] Keyword[this] operator[SEP]
}
|
public Iterator<ISO9660Directory> sortedIterator() {
if (sortedIterator == null) {
sortedIterator = new ISO9660DirectoryIterator(this, true);
}
sortedIterator.reset();
return sortedIterator;
} | class class_name[name] begin[{]
method[sortedIterator, return_type[type[Iterator]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.sortedIterator], ==, literal[null]]] begin[{]
assign[member[.sortedIterator], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ISO9660DirectoryIterator, sub_type=None))]
else begin[{]
None
end[}]
call[sortedIterator.reset, parameter[]]
return[member[.sortedIterator]]
end[}]
END[}] | Keyword[public] identifier[Iterator] operator[<] identifier[ISO9660Directory] operator[>] identifier[sortedIterator] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[sortedIterator] operator[==] Other[null] operator[SEP] {
identifier[sortedIterator] operator[=] Keyword[new] identifier[ISO9660DirectoryIterator] operator[SEP] Keyword[this] , literal[boolean] operator[SEP] operator[SEP]
}
identifier[sortedIterator] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[sortedIterator] operator[SEP]
}
|
public static JsonSchema createFromDatabase(final App app, final List<String> types) throws FrameworkException, URISyntaxException {
try (final Tx tx = app.tx()) {
final JsonSchema schema = StructrSchemaDefinition.initializeFromDatabase(app, types);
tx.success();
return schema;
}
} | class class_name[name] begin[{]
method[createFromDatabase, return_type[type[JsonSchema]], modifier[public static], parameter[app, types]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=app, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initializeFromDatabase, postfix_operators=[], prefix_operators=[], qualifier=StructrSchemaDefinition, selectors=[], type_arguments=None), name=schema)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JsonSchema, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=success, postfix_operators=[], prefix_operators=[], qualifier=tx, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=schema, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers={'final'}, name=tx, type=ReferenceType(arguments=None, dimensions=[], name=Tx, sub_type=None), value=MethodInvocation(arguments=[], member=tx, postfix_operators=[], prefix_operators=[], qualifier=app, selectors=[], type_arguments=None))])
end[}]
END[}] | Keyword[public] Keyword[static] identifier[JsonSchema] identifier[createFromDatabase] operator[SEP] Keyword[final] identifier[App] identifier[app] , Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[types] operator[SEP] Keyword[throws] identifier[FrameworkException] , identifier[URISyntaxException] {
Keyword[try] operator[SEP] Keyword[final] identifier[Tx] identifier[tx] operator[=] identifier[app] operator[SEP] identifier[tx] operator[SEP] operator[SEP] operator[SEP] {
Keyword[final] identifier[JsonSchema] identifier[schema] operator[=] identifier[StructrSchemaDefinition] operator[SEP] identifier[initializeFromDatabase] operator[SEP] identifier[app] , identifier[types] operator[SEP] operator[SEP] identifier[tx] operator[SEP] identifier[success] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[schema] operator[SEP]
}
}
|
@XmlElementDecl(namespace = "http://www.tibco.com/xmlns/ApplicationManagement", name = "application")
public JAXBElement<ApplicationType> createApplication(ApplicationType value) {
return new JAXBElement<ApplicationType>(_Application_QNAME, ApplicationType.class, null, value);
} | class class_name[name] begin[{]
method[createApplication, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_Application_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ApplicationType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), 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=ApplicationType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))]
end[}]
END[}] | annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[ApplicationType] operator[>] identifier[createApplication] operator[SEP] identifier[ApplicationType] identifier[value] operator[SEP] {
Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[ApplicationType] operator[>] operator[SEP] identifier[_Application_QNAME] , identifier[ApplicationType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP]
}
|
public com.google.privacy.dlp.v2.TransformationSummary.SummaryResult getResults(int index) {
return results_.get(index);
} | class class_name[name] begin[{]
method[getResults, return_type[type[com]], modifier[public], parameter[index]] begin[{]
return[call[results_.get, parameter[member[.index]]]]
end[}]
END[}] | Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[privacy] operator[SEP] identifier[dlp] operator[SEP] identifier[v2] operator[SEP] identifier[TransformationSummary] operator[SEP] identifier[SummaryResult] identifier[getResults] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[return] identifier[results_] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP]
}
|
private void outputSamples() {
int samples;
while ((samples = vorbisDspState.synthesis_pcmout(_pcmf, _index)) > 0) {
float[][] pcmf = _pcmf[0];
bout = (samples < convsize ? samples : convsize);
// convert doubles to 16 bit signed ints (host order) and
// interleave
for (i = 0; i < vorbisInfo.channels; i++) {
int pointer = i * 2;
//int ptr=i;
int mono = _index[i];
for (int j = 0; j < bout; j++) {
double fVal = pcmf[i][mono + j] * 32767.;
int val = (int) (fVal);
if (val > 32767) {
val = 32767;
}
if (val < -32768) {
val = -32768;
}
if (val < 0) {
val = val | 0x8000;
}
convbuffer[pointer] = (byte) (val);
convbuffer[pointer + 1] = (byte) (val >>> 8);
pointer += 2 * (vorbisInfo.channels);
}
}
LOG.log(Level.FINE, "about to write: {0}", 2 * vorbisInfo.channels * bout);
if (getCircularBuffer().availableWrite() < 2 * vorbisInfo.channels * bout) {
LOG.log(Level.FINE, "Too much data in this data packet, better return, let the channel drain, and try again...");
playState = playState_BufferFull;
return;
}
getCircularBuffer().write(convbuffer, 0, 2 * vorbisInfo.channels * bout);
if (bytes < bufferSize_) {
LOG.log(Level.FINE, "Finished with final buffer of music?");
}
if (vorbisDspState.synthesis_read(bout) != 0) {
LOG.log(Level.FINE, "VorbisDspState.synthesis_read returned -1.");
}
} // while(samples...)
playState = playState_ReadData;
} | class class_name[name] begin[{]
method[outputSamples, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[int], samples]
while[binary_operation[assign[member[.samples], call[vorbisDspState.synthesis_pcmout, parameter[member[._pcmf], member[._index]]]], >, literal[0]]] begin[{]
local_variable[type[float], pcmf]
assign[member[.bout], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=samples, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=convsize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), if_false=MemberReference(member=convsize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=samples, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=*), name=pointer)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=_index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=mono)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=pcmf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=mono, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32767.), operator=*), name=fVal)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=fVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), name=val)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32767), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32767)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=32768), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=32768)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x8000), operator=|)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=convbuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=pointer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=convbuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=pointer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), type==, value=Cast(expression=BinaryOperation(operandl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>>), type=BasicType(dimensions=[], name=byte))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=pointer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operandr=MemberReference(member=channels, postfix_operators=[], prefix_operators=[], qualifier=vorbisInfo, selectors=[]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bout, 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=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, 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=channels, postfix_operators=[], prefix_operators=[], qualifier=vorbisInfo, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
call[LOG.log, parameter[member[Level.FINE], literal["about to write: {0}"], binary_operation[binary_operation[literal[2], *, member[vorbisInfo.channels]], *, member[.bout]]]]
if[binary_operation[call[.getCircularBuffer, parameter[]], <, binary_operation[binary_operation[literal[2], *, member[vorbisInfo.channels]], *, member[.bout]]]] begin[{]
call[LOG.log, parameter[member[Level.FINE], literal["Too much data in this data packet, better return, let the channel drain, and try again..."]]]
assign[member[.playState], member[.playState_BufferFull]]
return[None]
else begin[{]
None
end[}]
call[.getCircularBuffer, parameter[]]
if[binary_operation[member[.bytes], <, member[.bufferSize_]]] begin[{]
call[LOG.log, parameter[member[Level.FINE], literal["Finished with final buffer of music?"]]]
else begin[{]
None
end[}]
if[binary_operation[call[vorbisDspState.synthesis_read, parameter[member[.bout]]], !=, literal[0]]] begin[{]
call[LOG.log, parameter[member[Level.FINE], literal["VorbisDspState.synthesis_read returned -1."]]]
else begin[{]
None
end[}]
end[}]
assign[member[.playState], member[.playState_ReadData]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[outputSamples] operator[SEP] operator[SEP] {
Keyword[int] identifier[samples] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[samples] operator[=] identifier[vorbisDspState] operator[SEP] identifier[synthesis_pcmout] operator[SEP] identifier[_pcmf] , identifier[_index] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] {
Keyword[float] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pcmf] operator[=] identifier[_pcmf] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[bout] operator[=] operator[SEP] identifier[samples] operator[<] identifier[convsize] operator[?] identifier[samples] operator[:] identifier[convsize] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[vorbisInfo] operator[SEP] identifier[channels] operator[SEP] identifier[i] operator[++] operator[SEP] {
Keyword[int] identifier[pointer] operator[=] identifier[i] operator[*] Other[2] operator[SEP] Keyword[int] identifier[mono] operator[=] identifier[_index] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[bout] operator[SEP] identifier[j] operator[++] operator[SEP] {
Keyword[double] identifier[fVal] operator[=] identifier[pcmf] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[mono] operator[+] identifier[j] operator[SEP] operator[*] literal[Float] operator[SEP] Keyword[int] identifier[val] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[fVal] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[val] operator[>] Other[32767] operator[SEP] {
identifier[val] operator[=] Other[32767] operator[SEP]
}
Keyword[if] operator[SEP] identifier[val] operator[<] operator[-] Other[32768] operator[SEP] {
identifier[val] operator[=] operator[-] Other[32768] operator[SEP]
}
Keyword[if] operator[SEP] identifier[val] operator[<] Other[0] operator[SEP] {
identifier[val] operator[=] identifier[val] operator[|] literal[Integer] operator[SEP]
}
identifier[convbuffer] operator[SEP] identifier[pointer] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[val] operator[SEP] operator[SEP] identifier[convbuffer] operator[SEP] identifier[pointer] operator[+] Other[1] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[val] operator[>] operator[>] operator[>] Other[8] operator[SEP] operator[SEP] identifier[pointer] operator[+=] Other[2] operator[*] operator[SEP] identifier[vorbisInfo] operator[SEP] identifier[channels] operator[SEP] operator[SEP]
}
}
identifier[LOG] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , literal[String] , Other[2] operator[*] identifier[vorbisInfo] operator[SEP] identifier[channels] operator[*] identifier[bout] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getCircularBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[availableWrite] operator[SEP] operator[SEP] operator[<] Other[2] operator[*] identifier[vorbisInfo] operator[SEP] identifier[channels] operator[*] identifier[bout] operator[SEP] {
identifier[LOG] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , literal[String] operator[SEP] operator[SEP] identifier[playState] operator[=] identifier[playState_BufferFull] operator[SEP] Keyword[return] operator[SEP]
}
identifier[getCircularBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[write] operator[SEP] identifier[convbuffer] , Other[0] , Other[2] operator[*] identifier[vorbisInfo] operator[SEP] identifier[channels] operator[*] identifier[bout] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bytes] operator[<] identifier[bufferSize_] operator[SEP] {
identifier[LOG] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , literal[String] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[vorbisDspState] operator[SEP] identifier[synthesis_read] operator[SEP] identifier[bout] operator[SEP] operator[!=] Other[0] operator[SEP] {
identifier[LOG] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , literal[String] operator[SEP] operator[SEP]
}
}
identifier[playState] operator[=] identifier[playState_ReadData] operator[SEP]
}
|
public long tick()
{
long tick = _clock.currentTimeMillis();
long diff = tick - _tick;
_tick = tick;
return diff;
} | class class_name[name] begin[{]
method[tick, return_type[type[long]], modifier[public], parameter[]] begin[{]
local_variable[type[long], tick]
local_variable[type[long], diff]
assign[member[._tick], member[.tick]]
return[member[.diff]]
end[}]
END[}] | Keyword[public] Keyword[long] identifier[tick] operator[SEP] operator[SEP] {
Keyword[long] identifier[tick] operator[=] identifier[_clock] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[diff] operator[=] identifier[tick] operator[-] identifier[_tick] operator[SEP] identifier[_tick] operator[=] identifier[tick] operator[SEP] Keyword[return] identifier[diff] operator[SEP]
}
|
public static final ConfigurationSourceKey jsonFile(final String name){
return new ConfigurationSourceKey(Type.FILE, Format.JSON, name);
} | class class_name[name] begin[{]
method[jsonFile, return_type[type[ConfigurationSourceKey]], modifier[final public static], parameter[name]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=FILE, postfix_operators=[], prefix_operators=[], qualifier=Type, selectors=[]), MemberReference(member=JSON, postfix_operators=[], prefix_operators=[], qualifier=Format, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ConfigurationSourceKey, sub_type=None))]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[final] identifier[ConfigurationSourceKey] identifier[jsonFile] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] {
Keyword[return] Keyword[new] identifier[ConfigurationSourceKey] operator[SEP] identifier[Type] operator[SEP] identifier[FILE] , identifier[Format] operator[SEP] identifier[JSON] , identifier[name] operator[SEP] operator[SEP]
}
|
public static String repeatChars(final char ch, final int count) {
return CharBuffer.allocate(count).toString().replace('\0', ch);
} | class class_name[name] begin[{]
method[repeatChars, return_type[type[String]], modifier[public static], parameter[ch, count]] begin[{]
return[call[CharBuffer.allocate, parameter[member[.count]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[repeatChars] operator[SEP] Keyword[final] Keyword[char] identifier[ch] , Keyword[final] Keyword[int] identifier[count] operator[SEP] {
Keyword[return] identifier[CharBuffer] operator[SEP] identifier[allocate] operator[SEP] identifier[count] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , identifier[ch] operator[SEP] operator[SEP]
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.