code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
private String parseMaxAgeMplus(String value, long lastModified) {
long currentTimeMillis = System.currentTimeMillis();
return Long.toString(Long.parseLong(value) + (lastModified - currentTimeMillis) / 1000);
} | class class_name[name] begin[{]
method[parseMaxAgeMplus, return_type[type[String]], modifier[private], parameter[value, lastModified]] begin[{]
local_variable[type[long], currentTimeMillis]
return[call[Long.toString, parameter[binary_operation[call[Long.parseLong, parameter[member[.value]]], +, binary_operation[binary_operation[member[.lastModified], -, member[.currentTimeMillis]], /, literal[1000]]]]]]
end[}]
END[}] | Keyword[private] identifier[String] identifier[parseMaxAgeMplus] operator[SEP] identifier[String] identifier[value] , Keyword[long] identifier[lastModified] operator[SEP] {
Keyword[long] identifier[currentTimeMillis] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[Long] operator[SEP] identifier[parseLong] operator[SEP] identifier[value] operator[SEP] operator[+] operator[SEP] identifier[lastModified] operator[-] identifier[currentTimeMillis] operator[SEP] operator[/] Other[1000] operator[SEP] operator[SEP]
}
|
public static boolean isSystemBroadcast(final CEMI frame) {
if (frame.getMessageCode() == CEMILData.MC_LDATA_IND && frame instanceof CEMILData) {
final CEMILData ldata = (CEMILData) frame;
final KNXAddress dst = ldata.getDestination();
return ldata.isSystemBroadcast() && dst instanceof GroupAddress && dst.getRawAddress() == 0;
}
return false;
} | class class_name[name] begin[{]
method[isSystemBroadcast, return_type[type[boolean]], modifier[public static], parameter[frame]] begin[{]
if[binary_operation[binary_operation[call[frame.getMessageCode, parameter[]], ==, member[CEMILData.MC_LDATA_IND]], &&, binary_operation[member[.frame], instanceof, type[CEMILData]]]] begin[{]
local_variable[type[CEMILData], ldata]
local_variable[type[KNXAddress], dst]
return[binary_operation[binary_operation[call[ldata.isSystemBroadcast, parameter[]], &&, binary_operation[member[.dst], instanceof, type[GroupAddress]]], &&, binary_operation[call[dst.getRawAddress, parameter[]], ==, literal[0]]]]
else begin[{]
None
end[}]
return[literal[false]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[boolean] identifier[isSystemBroadcast] operator[SEP] Keyword[final] identifier[CEMI] identifier[frame] operator[SEP] {
Keyword[if] operator[SEP] identifier[frame] operator[SEP] identifier[getMessageCode] operator[SEP] operator[SEP] operator[==] identifier[CEMILData] operator[SEP] identifier[MC_LDATA_IND] operator[&&] identifier[frame] Keyword[instanceof] identifier[CEMILData] operator[SEP] {
Keyword[final] identifier[CEMILData] identifier[ldata] operator[=] operator[SEP] identifier[CEMILData] operator[SEP] identifier[frame] operator[SEP] Keyword[final] identifier[KNXAddress] identifier[dst] operator[=] identifier[ldata] operator[SEP] identifier[getDestination] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[ldata] operator[SEP] identifier[isSystemBroadcast] operator[SEP] operator[SEP] operator[&&] identifier[dst] Keyword[instanceof] identifier[GroupAddress] operator[&&] identifier[dst] operator[SEP] identifier[getRawAddress] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP]
}
Keyword[return] literal[boolean] operator[SEP]
}
|
public static <T> ArrayList<T> sortThis(ArrayList<T> list, Comparator<? super T> comparator)
{
int size = list.size();
if (ArrayListIterate.canAccessInternalArray(list))
{
Arrays.sort(ArrayListIterate.getInternalArray(list), 0, size, comparator);
}
else
{
Collections.sort(list, comparator);
}
return list;
} | class class_name[name] begin[{]
method[sortThis, return_type[type[ArrayList]], modifier[public static], parameter[list, comparator]] begin[{]
local_variable[type[int], size]
if[call[ArrayListIterate.canAccessInternalArray, parameter[member[.list]]]] begin[{]
call[Arrays.sort, parameter[call[ArrayListIterate.getInternalArray, parameter[member[.list]]], literal[0], member[.size], member[.comparator]]]
else begin[{]
call[Collections.sort, parameter[member[.list], member[.comparator]]]
end[}]
return[member[.list]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[ArrayList] operator[<] identifier[T] operator[>] identifier[sortThis] operator[SEP] identifier[ArrayList] operator[<] identifier[T] operator[>] identifier[list] , identifier[Comparator] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[comparator] operator[SEP] {
Keyword[int] identifier[size] operator[=] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ArrayListIterate] operator[SEP] identifier[canAccessInternalArray] operator[SEP] identifier[list] operator[SEP] operator[SEP] {
identifier[Arrays] operator[SEP] identifier[sort] operator[SEP] identifier[ArrayListIterate] operator[SEP] identifier[getInternalArray] operator[SEP] identifier[list] operator[SEP] , Other[0] , identifier[size] , identifier[comparator] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[list] , identifier[comparator] operator[SEP] operator[SEP]
}
Keyword[return] identifier[list] operator[SEP]
}
|
private static String docComment(String doc, Object deprecation /* nullable */) {
StringBuilder docStr = new StringBuilder();
if (doc != null) {
docStr.append(doc.trim());
}
if (deprecation != null) {
docStr.append("\n\n").append("@deprecated");
if (deprecation instanceof String) {
docStr.append(" ").append(((String)deprecation).trim());
}
}
return DocEscaping.stringToDocComment(docStr.toString(), DocCommentStyle.ASTRISK_MARGIN);
} | class class_name[name] begin[{]
method[docComment, return_type[type[String]], modifier[private static], parameter[doc, deprecation]] begin[{]
local_variable[type[StringBuilder], docStr]
if[binary_operation[member[.doc], !=, literal[null]]] begin[{]
call[docStr.append, parameter[call[doc.trim, parameter[]]]]
else begin[{]
None
end[}]
if[binary_operation[member[.deprecation], !=, literal[null]]] begin[{]
call[docStr.append, parameter[literal["\n\n"]]]
if[binary_operation[member[.deprecation], instanceof, type[String]]] begin[{]
call[docStr.append, parameter[literal[" "]]]
else begin[{]
None
end[}]
else begin[{]
None
end[}]
return[call[DocEscaping.stringToDocComment, parameter[call[docStr.toString, parameter[]], member[DocCommentStyle.ASTRISK_MARGIN]]]]
end[}]
END[}] | Keyword[private] Keyword[static] identifier[String] identifier[docComment] operator[SEP] identifier[String] identifier[doc] , identifier[Object] identifier[deprecation] operator[SEP] {
identifier[StringBuilder] identifier[docStr] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[doc] operator[!=] Other[null] operator[SEP] {
identifier[docStr] operator[SEP] identifier[append] operator[SEP] identifier[doc] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[deprecation] operator[!=] Other[null] operator[SEP] {
identifier[docStr] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[deprecation] Keyword[instanceof] identifier[String] operator[SEP] {
identifier[docStr] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[deprecation] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[return] identifier[DocEscaping] operator[SEP] identifier[stringToDocComment] operator[SEP] identifier[docStr] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[DocCommentStyle] operator[SEP] identifier[ASTRISK_MARGIN] operator[SEP] operator[SEP]
}
|
static long getLong(byte[] buffer, int offset) {
return (buffer[offset] & 0xffL) << 56 | (buffer[offset + 1] & 0xffL) << 48 | (buffer[offset + 2] & 0xffL) << 40
| (buffer[offset + 3] & 0xffL) << 32 | (buffer[offset + 4] & 0xffL) << 24
| (buffer[offset + 5] & 0xffL) << 16 | (buffer[offset + 6] & 0xffL) << 8 | (buffer[offset + 7] & 0xffL);
} | class class_name[name] begin[{]
method[getLong, return_type[type[long]], modifier[static], parameter[buffer, offset]] begin[{]
return[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[.buffer], &, literal[0xffL]], <<, literal[56]], |, binary_operation[binary_operation[member[.buffer], &, literal[0xffL]], <<, literal[48]]], |, binary_operation[binary_operation[member[.buffer], &, literal[0xffL]], <<, literal[40]]], |, binary_operation[binary_operation[member[.buffer], &, literal[0xffL]], <<, literal[32]]], |, binary_operation[binary_operation[member[.buffer], &, literal[0xffL]], <<, literal[24]]], |, binary_operation[binary_operation[member[.buffer], &, literal[0xffL]], <<, literal[16]]], |, binary_operation[binary_operation[member[.buffer], &, literal[0xffL]], <<, literal[8]]], |, binary_operation[member[.buffer], &, literal[0xffL]]]]
end[}]
END[}] | Keyword[static] Keyword[long] identifier[getLong] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] , Keyword[int] identifier[offset] operator[SEP] {
Keyword[return] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[56] operator[|] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[1] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[48] operator[|] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[2] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[40] operator[|] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[3] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[32] operator[|] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[4] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[24] operator[|] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[5] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[16] operator[|] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[6] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[8] operator[|] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[+] Other[7] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP]
}
|
public List<String> getPeople()
{
try ( Session session = driver.session() )
{
return session.readTransaction( new TransactionWork<List<String>>()
{
@Override
public List<String> execute( Transaction tx )
{
return matchPersonNodes( tx );
}
} );
}
} | class class_name[name] begin[{]
method[getPeople, return_type[type[List]], modifier[public], parameter[]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=tx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matchPersonNodes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=execute, parameters=[FormalParameter(annotations=[], modifiers=set(), name=tx, type=ReferenceType(arguments=None, dimensions=[], name=Transaction, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, 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=String, sub_type=None))], dimensions=[], name=List, sub_type=None))], dimensions=None, name=TransactionWork, sub_type=None))], member=readTransaction, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=session, type=ReferenceType(arguments=None, dimensions=[], name=Session, sub_type=None), value=MethodInvocation(arguments=[], member=session, postfix_operators=[], prefix_operators=[], qualifier=driver, selectors=[], type_arguments=None))])
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getPeople] operator[SEP] operator[SEP] {
Keyword[try] operator[SEP] identifier[Session] identifier[session] operator[=] identifier[driver] operator[SEP] identifier[session] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[session] operator[SEP] identifier[readTransaction] operator[SEP] Keyword[new] identifier[TransactionWork] operator[<] identifier[List] operator[<] identifier[String] operator[>] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[execute] operator[SEP] identifier[Transaction] identifier[tx] operator[SEP] {
Keyword[return] identifier[matchPersonNodes] operator[SEP] identifier[tx] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP]
}
}
|
static Class<?> getOutputType(Class<?> fieldType) {
if (!Number.class.isAssignableFrom(fieldType)) {
throw new IllegalStateException("Aggregation SUM cannot be applied to property of type " + fieldType.getName());
}
if (fieldType == Double.class || fieldType == Float.class) {
return Double.class;
}
if (fieldType == Long.class || fieldType == Integer.class || fieldType == Byte.class || fieldType == Short.class) {
return Long.class;
}
return fieldType;
} | class class_name[name] begin[{]
method[getOutputType, return_type[type[Class]], modifier[static], parameter[fieldType]] begin[{]
if[ClassReference(postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=fieldType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Number, sub_type=None))] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Aggregation SUM cannot be applied to property of type "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=fieldType, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)
else begin[{]
None
end[}]
if[binary_operation[binary_operation[member[.fieldType], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Double, sub_type=None))], ||, binary_operation[member[.fieldType], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Float, sub_type=None))]]] begin[{]
return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Double, sub_type=None))]
else begin[{]
None
end[}]
if[binary_operation[binary_operation[binary_operation[binary_operation[member[.fieldType], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Long, sub_type=None))], ||, binary_operation[member[.fieldType], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None))]], ||, binary_operation[member[.fieldType], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Byte, sub_type=None))]], ||, binary_operation[member[.fieldType], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Short, sub_type=None))]]] begin[{]
return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Long, sub_type=None))]
else begin[{]
None
end[}]
return[member[.fieldType]]
end[}]
END[}] | Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[getOutputType] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[fieldType] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[Number] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[fieldType] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[fieldType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[fieldType] operator[==] identifier[Double] operator[SEP] Keyword[class] operator[||] identifier[fieldType] operator[==] identifier[Float] operator[SEP] Keyword[class] operator[SEP] {
Keyword[return] identifier[Double] operator[SEP] Keyword[class] operator[SEP]
}
Keyword[if] operator[SEP] identifier[fieldType] operator[==] identifier[Long] operator[SEP] Keyword[class] operator[||] identifier[fieldType] operator[==] identifier[Integer] operator[SEP] Keyword[class] operator[||] identifier[fieldType] operator[==] identifier[Byte] operator[SEP] Keyword[class] operator[||] identifier[fieldType] operator[==] identifier[Short] operator[SEP] Keyword[class] operator[SEP] {
Keyword[return] identifier[Long] operator[SEP] Keyword[class] operator[SEP]
}
Keyword[return] identifier[fieldType] operator[SEP]
}
|
@Override
public void write(byte[] b, int offset, int length) throws IOException {
if (length == 0) {
return;
}
int newcount = count + length;
if (newcount > buf.length) {
buf = Arrays.copyOf(buf, oversize(newcount));
}
System.arraycopy(b, offset, buf, count, length);
count = newcount;
} | class class_name[name] begin[{]
method[write, return_type[void], modifier[public], parameter[b, offset, length]] begin[{]
if[binary_operation[member[.length], ==, literal[0]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[int], newcount]
if[binary_operation[member[.newcount], >, member[buf.length]]] begin[{]
assign[member[.buf], call[Arrays.copyOf, parameter[member[.buf], call[.oversize, parameter[member[.newcount]]]]]]
else begin[{]
None
end[}]
call[System.arraycopy, parameter[member[.b], member[.offset], member[.buf], member[.count], member[.length]]]
assign[member[.count], member[.newcount]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] {
Keyword[return] operator[SEP]
}
Keyword[int] identifier[newcount] operator[=] identifier[count] operator[+] identifier[length] operator[SEP] Keyword[if] operator[SEP] identifier[newcount] operator[>] identifier[buf] operator[SEP] identifier[length] operator[SEP] {
identifier[buf] operator[=] identifier[Arrays] operator[SEP] identifier[copyOf] operator[SEP] identifier[buf] , identifier[oversize] operator[SEP] identifier[newcount] operator[SEP] operator[SEP] operator[SEP]
}
identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[b] , identifier[offset] , identifier[buf] , identifier[count] , identifier[length] operator[SEP] operator[SEP] identifier[count] operator[=] identifier[newcount] operator[SEP]
}
|
public void setHourTickMarksVisible(final boolean VISIBLE) {
if (null == hourTickMarksVisible) {
_hourTickMarksVisible = VISIBLE;
fireUpdateEvent(REDRAW_EVENT);
} else {
hourTickMarksVisible.set(VISIBLE);
}
} | class class_name[name] begin[{]
method[setHourTickMarksVisible, return_type[void], modifier[public], parameter[VISIBLE]] begin[{]
if[binary_operation[literal[null], ==, member[.hourTickMarksVisible]]] begin[{]
assign[member[._hourTickMarksVisible], member[.VISIBLE]]
call[.fireUpdateEvent, parameter[member[.REDRAW_EVENT]]]
else begin[{]
call[hourTickMarksVisible.set, parameter[member[.VISIBLE]]]
end[}]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setHourTickMarksVisible] operator[SEP] Keyword[final] Keyword[boolean] identifier[VISIBLE] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[hourTickMarksVisible] operator[SEP] {
identifier[_hourTickMarksVisible] operator[=] identifier[VISIBLE] operator[SEP] identifier[fireUpdateEvent] operator[SEP] identifier[REDRAW_EVENT] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[hourTickMarksVisible] operator[SEP] identifier[set] operator[SEP] identifier[VISIBLE] operator[SEP] operator[SEP]
}
}
|
private boolean isSafeAssign(Node n, boolean seenSideEffects) {
if (n.isAssign()) {
Node lhs = n.getFirstChild();
switch (lhs.getToken()) {
case NAME:
return true;
case GETPROP:
return !isExpressionTreeUnsafe(lhs.getFirstChild(), seenSideEffects);
case GETELEM:
return !isExpressionTreeUnsafe(lhs.getFirstChild(), seenSideEffects)
&& !isExpressionTreeUnsafe(lhs.getLastChild(), seenSideEffects);
default:
break;
}
}
return false;
} | class class_name[name] begin[{]
method[isSafeAssign, return_type[type[boolean]], modifier[private], parameter[n, seenSideEffects]] begin[{]
if[call[n.isAssign, parameter[]]] begin[{]
local_variable[type[Node], lhs]
SwitchStatement(cases=[SwitchStatementCase(case=['NAME'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]), SwitchStatementCase(case=['GETPROP'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFirstChild, postfix_operators=[], prefix_operators=[], qualifier=lhs, selectors=[], type_arguments=None), MemberReference(member=seenSideEffects, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isExpressionTreeUnsafe, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['GETELEM'], statements=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFirstChild, postfix_operators=[], prefix_operators=[], qualifier=lhs, selectors=[], type_arguments=None), MemberReference(member=seenSideEffects, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isExpressionTreeUnsafe, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLastChild, postfix_operators=[], prefix_operators=[], qualifier=lhs, selectors=[], type_arguments=None), MemberReference(member=seenSideEffects, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isExpressionTreeUnsafe, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), operator=&&), label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MethodInvocation(arguments=[], member=getToken, postfix_operators=[], prefix_operators=[], qualifier=lhs, selectors=[], type_arguments=None), label=None)
else begin[{]
None
end[}]
return[literal[false]]
end[}]
END[}] | Keyword[private] Keyword[boolean] identifier[isSafeAssign] operator[SEP] identifier[Node] identifier[n] , Keyword[boolean] identifier[seenSideEffects] operator[SEP] {
Keyword[if] operator[SEP] identifier[n] operator[SEP] identifier[isAssign] operator[SEP] operator[SEP] operator[SEP] {
identifier[Node] identifier[lhs] operator[=] identifier[n] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[lhs] operator[SEP] identifier[getToken] operator[SEP] operator[SEP] operator[SEP] {
Keyword[case] identifier[NAME] operator[:] Keyword[return] literal[boolean] operator[SEP] Keyword[case] identifier[GETPROP] operator[:] Keyword[return] operator[!] identifier[isExpressionTreeUnsafe] operator[SEP] identifier[lhs] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] , identifier[seenSideEffects] operator[SEP] operator[SEP] Keyword[case] identifier[GETELEM] operator[:] Keyword[return] operator[!] identifier[isExpressionTreeUnsafe] operator[SEP] identifier[lhs] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] , identifier[seenSideEffects] operator[SEP] operator[&&] operator[!] identifier[isExpressionTreeUnsafe] operator[SEP] identifier[lhs] operator[SEP] identifier[getLastChild] operator[SEP] operator[SEP] , identifier[seenSideEffects] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP]
}
}
Keyword[return] literal[boolean] operator[SEP]
}
|
public CreateCloudFormationChangeSetRequest withCapabilities(String... capabilities) {
if (this.capabilities == null) {
setCapabilities(new java.util.ArrayList<String>(capabilities.length));
}
for (String ele : capabilities) {
this.capabilities.add(ele);
}
return this;
} | class class_name[name] begin[{]
method[withCapabilities, return_type[type[CreateCloudFormationChangeSetRequest]], modifier[public], parameter[capabilities]] begin[{]
if[binary_operation[THIS[member[None.capabilities]], ==, literal[null]]] begin[{]
call[.setCapabilities, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=capabilities, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]]
else begin[{]
None
end[}]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=capabilities, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=capabilities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[CreateCloudFormationChangeSetRequest] identifier[withCapabilities] operator[SEP] identifier[String] operator[...] identifier[capabilities] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[capabilities] operator[==] Other[null] operator[SEP] {
identifier[setCapabilities] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[capabilities] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[for] operator[SEP] identifier[String] identifier[ele] operator[:] identifier[capabilities] operator[SEP] {
Keyword[this] operator[SEP] identifier[capabilities] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP]
}
Keyword[return] Keyword[this] operator[SEP]
}
|
public int getState()
{
boolean hasSuspendedComponents = false;
boolean hasResumedComponents = false;
List<Suspendable> suspendableComponents = getComponentInstancesOfType(Suspendable.class);
for (Suspendable component : suspendableComponents)
{
if (component.isSuspended())
{
hasSuspendedComponents = true;
}
else
{
hasResumedComponents = true;
}
}
if (hasSuspendedComponents && !hasResumedComponents)
{
return ManageableRepository.SUSPENDED;
}
else if (!hasSuspendedComponents)
{
return ManageableRepository.ONLINE;
}
else
{
return ManageableRepository.UNDEFINED;
}
} | class class_name[name] begin[{]
method[getState, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[boolean], hasSuspendedComponents]
local_variable[type[boolean], hasResumedComponents]
local_variable[type[List], suspendableComponents]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isSuspended, postfix_operators=[], prefix_operators=[], qualifier=component, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=hasResumedComponents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=hasSuspendedComponents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=suspendableComponents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=component)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Suspendable, sub_type=None))), label=None)
if[binary_operation[member[.hasSuspendedComponents], &&, member[.hasResumedComponents]]] begin[{]
return[member[ManageableRepository.SUSPENDED]]
else begin[{]
if[member[.hasSuspendedComponents]] begin[{]
return[member[ManageableRepository.ONLINE]]
else begin[{]
return[member[ManageableRepository.UNDEFINED]]
end[}]
end[}]
end[}]
END[}] | Keyword[public] Keyword[int] identifier[getState] operator[SEP] operator[SEP] {
Keyword[boolean] identifier[hasSuspendedComponents] operator[=] literal[boolean] operator[SEP] Keyword[boolean] identifier[hasResumedComponents] operator[=] literal[boolean] operator[SEP] identifier[List] operator[<] identifier[Suspendable] operator[>] identifier[suspendableComponents] operator[=] identifier[getComponentInstancesOfType] operator[SEP] identifier[Suspendable] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Suspendable] identifier[component] operator[:] identifier[suspendableComponents] operator[SEP] {
Keyword[if] operator[SEP] identifier[component] operator[SEP] identifier[isSuspended] operator[SEP] operator[SEP] operator[SEP] {
identifier[hasSuspendedComponents] operator[=] literal[boolean] operator[SEP]
}
Keyword[else] {
identifier[hasResumedComponents] operator[=] literal[boolean] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[hasSuspendedComponents] operator[&&] operator[!] identifier[hasResumedComponents] operator[SEP] {
Keyword[return] identifier[ManageableRepository] operator[SEP] identifier[SUSPENDED] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[hasSuspendedComponents] operator[SEP] {
Keyword[return] identifier[ManageableRepository] operator[SEP] identifier[ONLINE] operator[SEP]
}
Keyword[else] {
Keyword[return] identifier[ManageableRepository] operator[SEP] identifier[UNDEFINED] operator[SEP]
}
}
|
public void run()
{
MessageLog recMessageLog = (MessageLog)this.getMainRecord();
try {
Date timeTimeout = null;
while (recMessageLog.hasNext())
{
recMessageLog.next();
timeTimeout = ((DateTimeField)recMessageLog.getField(MessageLog.TIMEOUT_TIME)).getDateTime();
if (timeTimeout == null)
continue; // Never
if (timeTimeout.getTime() > System.currentTimeMillis())
break;
String strTrxID = recMessageLog.getCounterField().toString();
recMessageLog.edit();
int iErrorStatus = ((ReferenceField)recMessageLog.getField(MessageLog.MESSAGE_STATUS_ID)).getIDFromCode(MessageStatus.ERROR);
recMessageLog.getField(MessageLog.MESSAGE_STATUS_ID).setValue(iErrorStatus);
recMessageLog.set();
this.processMessageTimeout(strTrxID);
}
if (recMessageLog.getEditMode() == DBConstants.EDIT_CURRENT)
if (timeTimeout != null) // Always
{ // More to process, schedule it for later
MessageManager messageManager = ((Application)getTask().getApplication()).getMessageManager();
Map<String,Object> properties = new Hashtable<String,Object>();
properties.put(PrivateTaskScheduler.TIME_TO_RUN, timeTimeout);
properties.put(PrivateTaskScheduler.NO_DUPLICATE, Constants.TRUE);
properties.put(DBParams.PROCESS, MessageTimeoutProcess.class.getName());
if (messageManager != null)
messageManager.sendMessage(new MapMessage(new BaseMessageHeader(MessageTimeoutProcess.TIMEOUT_QUEUE_NAME, MessageConstants.INTRANET_QUEUE, this, null), properties));
}
} catch (DBException ex) {
ex.printStackTrace();
}
} | class class_name[name] begin[{]
method[run, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[MessageLog], recMessageLog]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=timeTimeout)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Date, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=recMessageLog, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=timeTimeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=TIMEOUT_TIME, postfix_operators=[], prefix_operators=[], qualifier=MessageLog, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=recMessageLog, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=DateTimeField, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=timeTimeout, 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=ContinueStatement(goto=None, label=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTime, postfix_operators=[], prefix_operators=[], qualifier=timeTimeout, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=currentTimeMillis, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), operator=>), else_statement=None, label=None, then_statement=BreakStatement(goto=None, label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCounterField, postfix_operators=[], prefix_operators=[], qualifier=recMessageLog, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=strTrxID)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=edit, postfix_operators=[], prefix_operators=[], qualifier=recMessageLog, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=MESSAGE_STATUS_ID, postfix_operators=[], prefix_operators=[], qualifier=MessageLog, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=recMessageLog, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ReferenceField, sub_type=None)), name=iErrorStatus)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=MESSAGE_STATUS_ID, postfix_operators=[], prefix_operators=[], qualifier=MessageLog, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=recMessageLog, selectors=[MethodInvocation(arguments=[MemberReference(member=iErrorStatus, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=set, postfix_operators=[], prefix_operators=[], qualifier=recMessageLog, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=strTrxID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processMessageTimeout, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=recMessageLog, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEditMode, postfix_operators=[], prefix_operators=[], qualifier=recMessageLog, selectors=[], type_arguments=None), operandr=MemberReference(member=EDIT_CURRENT, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[]), operator===), else_statement=None, label=None, then_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=timeTimeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getTask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getApplication, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Application, sub_type=None)), name=messageManager)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MessageManager, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=Hashtable, sub_type=None)), name=properties)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TIME_TO_RUN, postfix_operators=[], prefix_operators=[], qualifier=PrivateTaskScheduler, selectors=[]), MemberReference(member=timeTimeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=NO_DUPLICATE, postfix_operators=[], prefix_operators=[], qualifier=PrivateTaskScheduler, selectors=[]), MemberReference(member=TRUE, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=PROCESS, postfix_operators=[], prefix_operators=[], qualifier=DBParams, selectors=[]), 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=MessageTimeoutProcess, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=messageManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=TIMEOUT_QUEUE_NAME, postfix_operators=[], prefix_operators=[], qualifier=MessageTimeoutProcess, selectors=[]), MemberReference(member=INTRANET_QUEUE, postfix_operators=[], prefix_operators=[], qualifier=MessageConstants, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BaseMessageHeader, sub_type=None)), MemberReference(member=properties, 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=MapMessage, sub_type=None))], member=sendMessage, postfix_operators=[], prefix_operators=[], qualifier=messageManager, selectors=[], type_arguments=None), label=None))])))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['DBException']))], finally_block=None, label=None, resources=None)
end[}]
END[}] | Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] {
identifier[MessageLog] identifier[recMessageLog] operator[=] operator[SEP] identifier[MessageLog] operator[SEP] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[Date] identifier[timeTimeout] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] identifier[recMessageLog] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] {
identifier[recMessageLog] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[timeTimeout] operator[=] operator[SEP] operator[SEP] identifier[DateTimeField] operator[SEP] identifier[recMessageLog] operator[SEP] identifier[getField] operator[SEP] identifier[MessageLog] operator[SEP] identifier[TIMEOUT_TIME] operator[SEP] operator[SEP] operator[SEP] identifier[getDateTime] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[timeTimeout] operator[==] Other[null] operator[SEP] Keyword[continue] operator[SEP] Keyword[if] operator[SEP] identifier[timeTimeout] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[>] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] identifier[String] identifier[strTrxID] operator[=] identifier[recMessageLog] operator[SEP] identifier[getCounterField] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[recMessageLog] operator[SEP] identifier[edit] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[iErrorStatus] operator[=] operator[SEP] operator[SEP] identifier[ReferenceField] operator[SEP] identifier[recMessageLog] operator[SEP] identifier[getField] operator[SEP] identifier[MessageLog] operator[SEP] identifier[MESSAGE_STATUS_ID] operator[SEP] operator[SEP] operator[SEP] identifier[getIDFromCode] operator[SEP] identifier[MessageStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] identifier[recMessageLog] operator[SEP] identifier[getField] operator[SEP] identifier[MessageLog] operator[SEP] identifier[MESSAGE_STATUS_ID] operator[SEP] operator[SEP] identifier[setValue] operator[SEP] identifier[iErrorStatus] operator[SEP] operator[SEP] identifier[recMessageLog] operator[SEP] identifier[set] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[processMessageTimeout] operator[SEP] identifier[strTrxID] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[recMessageLog] operator[SEP] identifier[getEditMode] operator[SEP] operator[SEP] operator[==] identifier[DBConstants] operator[SEP] identifier[EDIT_CURRENT] operator[SEP] Keyword[if] operator[SEP] identifier[timeTimeout] operator[!=] Other[null] operator[SEP] {
identifier[MessageManager] identifier[messageManager] operator[=] operator[SEP] operator[SEP] identifier[Application] operator[SEP] identifier[getTask] operator[SEP] operator[SEP] operator[SEP] identifier[getApplication] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getMessageManager] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[properties] operator[=] Keyword[new] identifier[Hashtable] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[put] operator[SEP] identifier[PrivateTaskScheduler] operator[SEP] identifier[TIME_TO_RUN] , identifier[timeTimeout] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[put] operator[SEP] identifier[PrivateTaskScheduler] operator[SEP] identifier[NO_DUPLICATE] , identifier[Constants] operator[SEP] identifier[TRUE] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[put] operator[SEP] identifier[DBParams] operator[SEP] identifier[PROCESS] , identifier[MessageTimeoutProcess] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[messageManager] operator[!=] Other[null] operator[SEP] identifier[messageManager] operator[SEP] identifier[sendMessage] operator[SEP] Keyword[new] identifier[MapMessage] operator[SEP] Keyword[new] identifier[BaseMessageHeader] operator[SEP] identifier[MessageTimeoutProcess] operator[SEP] identifier[TIMEOUT_QUEUE_NAME] , identifier[MessageConstants] operator[SEP] identifier[INTRANET_QUEUE] , Keyword[this] , Other[null] operator[SEP] , identifier[properties] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[catch] operator[SEP] identifier[DBException] identifier[ex] operator[SEP] {
identifier[ex] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP]
}
}
|
@SuppressWarnings("unused")
private void executeProgram(String name, String[] source) throws Exception
{
String _singleStringSource = executeProgram__makeSingleStringSource(source);
executeProgram(name, _singleStringSource);
} | class class_name[name] begin[{]
method[executeProgram, return_type[void], modifier[private], parameter[name, source]] begin[{]
local_variable[type[String], _singleStringSource]
call[.executeProgram, parameter[member[.name], member[._singleStringSource]]]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[executeProgram] operator[SEP] identifier[String] identifier[name] , identifier[String] operator[SEP] operator[SEP] identifier[source] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[_singleStringSource] operator[=] identifier[executeProgram__makeSingleStringSource] operator[SEP] identifier[source] operator[SEP] operator[SEP] identifier[executeProgram] operator[SEP] identifier[name] , identifier[_singleStringSource] operator[SEP] operator[SEP]
}
|
public EventSubscription withEventCategoriesList(String... eventCategoriesList) {
if (this.eventCategoriesList == null) {
setEventCategoriesList(new com.amazonaws.internal.SdkInternalList<String>(eventCategoriesList.length));
}
for (String ele : eventCategoriesList) {
this.eventCategoriesList.add(ele);
}
return this;
} | class class_name[name] begin[{]
method[withEventCategoriesList, return_type[type[EventSubscription]], modifier[public], parameter[eventCategoriesList]] begin[{]
if[binary_operation[THIS[member[None.eventCategoriesList]], ==, literal[null]]] begin[{]
call[.setEventCategoriesList, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=eventCategoriesList, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))]]
else begin[{]
None
end[}]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=eventCategoriesList, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=eventCategoriesList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[EventSubscription] identifier[withEventCategoriesList] operator[SEP] identifier[String] operator[...] identifier[eventCategoriesList] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[eventCategoriesList] operator[==] Other[null] operator[SEP] {
identifier[setEventCategoriesList] operator[SEP] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[eventCategoriesList] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[for] operator[SEP] identifier[String] identifier[ele] operator[:] identifier[eventCategoriesList] operator[SEP] {
Keyword[this] operator[SEP] identifier[eventCategoriesList] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP]
}
Keyword[return] Keyword[this] operator[SEP]
}
|
private FilePath createWrapperScript(FilePath tempBinDir, String name, String content) throws IOException, InterruptedException {
FilePath scriptFile = tempBinDir.child(name);
envOverride.put(MVN_CMD, scriptFile.getRemote());
scriptFile.write(content, getComputer().getDefaultCharset().name());
scriptFile.chmod(0755);
return scriptFile;
} | class class_name[name] begin[{]
method[createWrapperScript, return_type[type[FilePath]], modifier[private], parameter[tempBinDir, name, content]] begin[{]
local_variable[type[FilePath], scriptFile]
call[envOverride.put, parameter[member[.MVN_CMD], call[scriptFile.getRemote, parameter[]]]]
call[scriptFile.write, parameter[member[.content], call[.getComputer, parameter[]]]]
call[scriptFile.chmod, parameter[literal[0755]]]
return[member[.scriptFile]]
end[}]
END[}] | Keyword[private] identifier[FilePath] identifier[createWrapperScript] operator[SEP] identifier[FilePath] identifier[tempBinDir] , identifier[String] identifier[name] , identifier[String] identifier[content] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InterruptedException] {
identifier[FilePath] identifier[scriptFile] operator[=] identifier[tempBinDir] operator[SEP] identifier[child] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[envOverride] operator[SEP] identifier[put] operator[SEP] identifier[MVN_CMD] , identifier[scriptFile] operator[SEP] identifier[getRemote] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[scriptFile] operator[SEP] identifier[write] operator[SEP] identifier[content] , identifier[getComputer] operator[SEP] operator[SEP] operator[SEP] identifier[getDefaultCharset] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[scriptFile] operator[SEP] identifier[chmod] operator[SEP] literal[Integer] operator[SEP] operator[SEP] Keyword[return] identifier[scriptFile] operator[SEP]
}
|
public void processDynamicFile(Map<String, Object> context, TemplatePack templatePack, Template template) throws Exception {
try {
if (!(template.getName().indexOf(".vm.") >= 0 || template.getName().endsWith(".vm"))) {
throw new IllegalStateException("not a velocity template!: " + template.getName());
}
String evaluatedTemplate = null;
try {
evaluatedTemplate = velocityGenerator.evaluate(context, templatePack, template);
} catch (StopFileReachedException e) {
return;
}
if (currentFullFilename.endsWith(".donotgenerate")) {
return;
}
if (isBlank(currentFullFilename)) {
log.error("In " + templatePack.getName() + ":" + template.getName() + " target filename is missing");
return;
}
if (!config.getCelerio().getConfiguration().hasFilename(templatePack.getName(), currentFullFilename)) {
packDebug(templatePack, "SKIPPING:" + currentFullFilename);
return;
}
if (currentEnableDynamicImport) {
if (ImportsContext.getCurrentImportsHolder().hasImports()) {
evaluatedTemplate = evaluatedTemplate.replace(DYNA_IMPORTS_TAG, "\n" + ImportsContext.getCurrentImportsHolder().toJavaImportString());
} else {
evaluatedTemplate = evaluatedTemplate.replace(DYNA_IMPORTS_TAG, "");
}
}
if (currentFullFilename.endsWith(".java")) {
evaluatedTemplate = eclipseCodeFormatter.format(evaluatedTemplate);
} else if (currentFullFilename.endsWith(".xml") || currentFullFilename.endsWith(".xhtml")) {
evaluatedTemplate = xmlCodeFormatter.format(evaluatedTemplate);
}
// generated content is in the string writer
if (log.isDebugEnabled()) {
packDebug(templatePack, "processing template " + template.getName() + " (" + currentFullFilename + ")");
}
try {
contentWriter.processFile(outputResult, templatePack, template, evaluatedTemplate.getBytes("UTF-8"), currentFullFilename);
} catch (Exception e) {
log.error("In " + templatePack.getName() + ":" + template.getName() + " template, got exception " + e.getMessage(), e);
}
} finally {
clearDynamicFileContext();
}
} | class class_name[name] begin[{]
method[processDynamicFile, return_type[void], modifier[public], parameter[context, templatePack, template]] begin[{]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=template, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".vm.")], member=indexOf, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=template, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".vm")], member=endsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="not a velocity template!: "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=template, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=evaluatedTemplate)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=evaluatedTemplate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=templatePack, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=template, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=evaluate, postfix_operators=[], prefix_operators=[], qualifier=velocityGenerator, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=None, label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['StopFileReachedException']))], finally_block=None, label=None, resources=None), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".donotgenerate")], member=endsWith, postfix_operators=[], prefix_operators=[], qualifier=currentFullFilename, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=None, label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=currentFullFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isBlank, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="In "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=templatePack, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":"), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=template, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" target filename is missing"), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=getCelerio, postfix_operators=[], prefix_operators=['!'], qualifier=config, selectors=[MethodInvocation(arguments=[], member=getConfiguration, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=templatePack, selectors=[], type_arguments=None), MemberReference(member=currentFullFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasFilename, 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=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=templatePack, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SKIPPING:"), operandr=MemberReference(member=currentFullFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=packDebug, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])), IfStatement(condition=MemberReference(member=currentEnableDynamicImport, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getCurrentImportsHolder, postfix_operators=[], prefix_operators=[], qualifier=ImportsContext, selectors=[MethodInvocation(arguments=[], member=hasImports, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=evaluatedTemplate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=DYNA_IMPORTS_TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=replace, postfix_operators=[], prefix_operators=[], qualifier=evaluatedTemplate, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=evaluatedTemplate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=DYNA_IMPORTS_TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n"), operandr=MethodInvocation(arguments=[], member=getCurrentImportsHolder, postfix_operators=[], prefix_operators=[], qualifier=ImportsContext, selectors=[MethodInvocation(arguments=[], member=toJavaImportString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], member=replace, postfix_operators=[], prefix_operators=[], qualifier=evaluatedTemplate, selectors=[], type_arguments=None)), label=None)]))])), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".java")], member=endsWith, postfix_operators=[], prefix_operators=[], qualifier=currentFullFilename, selectors=[], type_arguments=None), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".xml")], member=endsWith, postfix_operators=[], prefix_operators=[], qualifier=currentFullFilename, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".xhtml")], member=endsWith, postfix_operators=[], prefix_operators=[], qualifier=currentFullFilename, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=evaluatedTemplate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=evaluatedTemplate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=xmlCodeFormatter, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=evaluatedTemplate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=evaluatedTemplate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=eclipseCodeFormatter, selectors=[], type_arguments=None)), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=templatePack, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="processing template "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=template, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ("), operator=+), operandr=MemberReference(member=currentFullFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=")"), operator=+)], member=packDebug, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=outputResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=templatePack, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=template, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF-8")], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=evaluatedTemplate, selectors=[], type_arguments=None), MemberReference(member=currentFullFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processFile, postfix_operators=[], prefix_operators=[], qualifier=contentWriter, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="In "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=templatePack, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":"), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=template, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" template, got exception "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=clearDynamicFileContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None)
end[}]
END[}] | Keyword[public] Keyword[void] identifier[processDynamicFile] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[context] , identifier[TemplatePack] identifier[templatePack] , identifier[Template] identifier[template] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[try] {
Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[template] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[>=] Other[0] operator[||] identifier[template] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[template] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
identifier[String] identifier[evaluatedTemplate] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[evaluatedTemplate] operator[=] identifier[velocityGenerator] operator[SEP] identifier[evaluate] operator[SEP] identifier[context] , identifier[templatePack] , identifier[template] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[StopFileReachedException] identifier[e] operator[SEP] {
Keyword[return] operator[SEP]
}
Keyword[if] operator[SEP] identifier[currentFullFilename] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP]
}
Keyword[if] operator[SEP] identifier[isBlank] operator[SEP] identifier[currentFullFilename] operator[SEP] operator[SEP] {
identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[templatePack] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[template] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP]
}
Keyword[if] operator[SEP] operator[!] identifier[config] operator[SEP] identifier[getCelerio] operator[SEP] operator[SEP] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[hasFilename] operator[SEP] identifier[templatePack] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[currentFullFilename] operator[SEP] operator[SEP] {
identifier[packDebug] operator[SEP] identifier[templatePack] , literal[String] operator[+] identifier[currentFullFilename] operator[SEP] operator[SEP] Keyword[return] operator[SEP]
}
Keyword[if] operator[SEP] identifier[currentEnableDynamicImport] operator[SEP] {
Keyword[if] operator[SEP] identifier[ImportsContext] operator[SEP] identifier[getCurrentImportsHolder] operator[SEP] operator[SEP] operator[SEP] identifier[hasImports] operator[SEP] operator[SEP] operator[SEP] {
identifier[evaluatedTemplate] operator[=] identifier[evaluatedTemplate] operator[SEP] identifier[replace] operator[SEP] identifier[DYNA_IMPORTS_TAG] , literal[String] operator[+] identifier[ImportsContext] operator[SEP] identifier[getCurrentImportsHolder] operator[SEP] operator[SEP] operator[SEP] identifier[toJavaImportString] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[evaluatedTemplate] operator[=] identifier[evaluatedTemplate] operator[SEP] identifier[replace] operator[SEP] identifier[DYNA_IMPORTS_TAG] , literal[String] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[currentFullFilename] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] {
identifier[evaluatedTemplate] operator[=] identifier[eclipseCodeFormatter] operator[SEP] identifier[format] operator[SEP] identifier[evaluatedTemplate] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[currentFullFilename] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[currentFullFilename] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] {
identifier[evaluatedTemplate] operator[=] identifier[xmlCodeFormatter] operator[SEP] identifier[format] operator[SEP] identifier[evaluatedTemplate] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[packDebug] operator[SEP] identifier[templatePack] , literal[String] operator[+] identifier[template] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[currentFullFilename] operator[+] literal[String] operator[SEP] operator[SEP]
}
Keyword[try] {
identifier[contentWriter] operator[SEP] identifier[processFile] operator[SEP] identifier[outputResult] , identifier[templatePack] , identifier[template] , identifier[evaluatedTemplate] operator[SEP] identifier[getBytes] operator[SEP] literal[String] operator[SEP] , identifier[currentFullFilename] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] {
identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[templatePack] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[template] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP]
}
}
Keyword[finally] {
identifier[clearDynamicFileContext] operator[SEP] operator[SEP] operator[SEP]
}
}
|
public static String encryptByPrivateKey(String data, String privateKey) throws Exception {
PKCS8EncodedKeySpec priPKCS8 = new PKCS8EncodedKeySpec(base64.decode(privateKey));
KeyFactory keyf = KeyFactory.getInstance("RSA");
PrivateKey priKey = keyf.generatePrivate(priPKCS8);
java.security.Signature signature = java.security.Signature.getInstance("SHA256WithRSA");
signature.initSign(priKey);
signature.update(data.getBytes("UTf-8"));
byte[] signed = signature.sign();
return base64.encodeToString(signed);
} | class class_name[name] begin[{]
method[encryptByPrivateKey, return_type[type[String]], modifier[public static], parameter[data, privateKey]] begin[{]
local_variable[type[PKCS8EncodedKeySpec], priPKCS8]
local_variable[type[KeyFactory], keyf]
local_variable[type[PrivateKey], priKey]
local_variable[type[java], signature]
call[signature.initSign, parameter[member[.priKey]]]
call[signature.update, parameter[call[data.getBytes, parameter[literal["UTf-8"]]]]]
local_variable[type[byte], signed]
return[call[base64.encodeToString, parameter[member[.signed]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[encryptByPrivateKey] operator[SEP] identifier[String] identifier[data] , identifier[String] identifier[privateKey] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[PKCS8EncodedKeySpec] identifier[priPKCS8] operator[=] Keyword[new] identifier[PKCS8EncodedKeySpec] operator[SEP] identifier[base64] operator[SEP] identifier[decode] operator[SEP] identifier[privateKey] operator[SEP] operator[SEP] operator[SEP] identifier[KeyFactory] identifier[keyf] operator[=] identifier[KeyFactory] operator[SEP] identifier[getInstance] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[PrivateKey] identifier[priKey] operator[=] identifier[keyf] operator[SEP] identifier[generatePrivate] operator[SEP] identifier[priPKCS8] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[security] operator[SEP] identifier[Signature] identifier[signature] operator[=] identifier[java] operator[SEP] identifier[security] operator[SEP] identifier[Signature] operator[SEP] identifier[getInstance] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[signature] operator[SEP] identifier[initSign] operator[SEP] identifier[priKey] operator[SEP] operator[SEP] identifier[signature] operator[SEP] identifier[update] operator[SEP] identifier[data] operator[SEP] identifier[getBytes] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[signed] operator[=] identifier[signature] operator[SEP] identifier[sign] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[base64] operator[SEP] identifier[encodeToString] operator[SEP] identifier[signed] operator[SEP] operator[SEP]
}
|
void tokenize(String pat, Vector targetStrings)
throws javax.xml.transform.TransformerException
{
m_compiler.m_currentPattern = pat;
m_patternMapSize = 0;
// This needs to grow too. Use a conservative estimate that the OpMapVector
// needs about five time the length of the input path expression - to a
// maximum of MAXTOKENQUEUESIZE*5. If the OpMapVector needs to grow, grow
// it freely (second argument to constructor).
int initTokQueueSize = ((pat.length() < OpMap.MAXTOKENQUEUESIZE)
? pat.length() : OpMap.MAXTOKENQUEUESIZE) * 5;
m_compiler.m_opMap = new OpMapVector(initTokQueueSize,
OpMap.BLOCKTOKENQUEUESIZE * 5,
OpMap.MAPINDEX_LENGTH);
int nChars = pat.length();
int startSubstring = -1;
int posOfNSSep = -1;
boolean isStartOfPat = true;
boolean isAttrName = false;
boolean isNum = false;
// Nesting of '[' so we can know if the given element should be
// counted inside the m_patternMap.
int nesting = 0;
// char[] chars = pat.toCharArray();
for (int i = 0; i < nChars; i++)
{
char c = pat.charAt(i);
switch (c)
{
case '\"' :
{
if (startSubstring != -1)
{
isNum = false;
isStartOfPat = mapPatternElemPos(nesting, isStartOfPat, isAttrName);
isAttrName = false;
if (-1 != posOfNSSep)
{
posOfNSSep = mapNSTokens(pat, startSubstring, posOfNSSep, i);
}
else
{
addToTokenQueue(pat.substring(startSubstring, i));
}
}
startSubstring = i;
for (i++; (i < nChars) && ((c = pat.charAt(i)) != '\"'); i++);
if (c == '\"' && i < nChars)
{
addToTokenQueue(pat.substring(startSubstring, i + 1));
startSubstring = -1;
}
else
{
m_processor.error(XPATHErrorResources.ER_EXPECTED_DOUBLE_QUOTE,
null); //"misquoted literal... expected double quote!");
}
}
break;
case '\'' :
if (startSubstring != -1)
{
isNum = false;
isStartOfPat = mapPatternElemPos(nesting, isStartOfPat, isAttrName);
isAttrName = false;
if (-1 != posOfNSSep)
{
posOfNSSep = mapNSTokens(pat, startSubstring, posOfNSSep, i);
}
else
{
addToTokenQueue(pat.substring(startSubstring, i));
}
}
startSubstring = i;
for (i++; (i < nChars) && ((c = pat.charAt(i)) != '\''); i++);
if (c == '\'' && i < nChars)
{
addToTokenQueue(pat.substring(startSubstring, i + 1));
startSubstring = -1;
}
else
{
m_processor.error(XPATHErrorResources.ER_EXPECTED_SINGLE_QUOTE,
null); //"misquoted literal... expected single quote!");
}
break;
case 0x0A :
case 0x0D :
case ' ' :
case '\t' :
if (startSubstring != -1)
{
isNum = false;
isStartOfPat = mapPatternElemPos(nesting, isStartOfPat, isAttrName);
isAttrName = false;
if (-1 != posOfNSSep)
{
posOfNSSep = mapNSTokens(pat, startSubstring, posOfNSSep, i);
}
else
{
addToTokenQueue(pat.substring(startSubstring, i));
}
startSubstring = -1;
}
break;
case '@' :
isAttrName = true;
// fall-through on purpose
case '-' :
if ('-' == c)
{
if (!(isNum || (startSubstring == -1)))
{
break;
}
isNum = false;
}
// fall-through on purpose
case '(' :
case '[' :
case ')' :
case ']' :
case '|' :
case '/' :
case '*' :
case '+' :
case '=' :
case ',' :
case '\\' : // Unused at the moment
case '^' : // Unused at the moment
case '!' : // Unused at the moment
case '$' :
case '<' :
case '>' :
if (startSubstring != -1)
{
isNum = false;
isStartOfPat = mapPatternElemPos(nesting, isStartOfPat, isAttrName);
isAttrName = false;
if (-1 != posOfNSSep)
{
posOfNSSep = mapNSTokens(pat, startSubstring, posOfNSSep, i);
}
else
{
addToTokenQueue(pat.substring(startSubstring, i));
}
startSubstring = -1;
}
else if (('/' == c) && isStartOfPat)
{
isStartOfPat = mapPatternElemPos(nesting, isStartOfPat, isAttrName);
}
else if ('*' == c)
{
isStartOfPat = mapPatternElemPos(nesting, isStartOfPat, isAttrName);
isAttrName = false;
}
if (0 == nesting)
{
if ('|' == c)
{
if (null != targetStrings)
{
recordTokenString(targetStrings);
}
isStartOfPat = true;
}
}
if ((')' == c) || (']' == c))
{
nesting--;
}
else if (('(' == c) || ('[' == c))
{
nesting++;
}
addToTokenQueue(pat.substring(i, i + 1));
break;
case ':' :
if (i>0)
{
if (posOfNSSep == (i - 1))
{
if (startSubstring != -1)
{
if (startSubstring < (i - 1))
addToTokenQueue(pat.substring(startSubstring, i - 1));
}
isNum = false;
isAttrName = false;
startSubstring = -1;
posOfNSSep = -1;
addToTokenQueue(pat.substring(i - 1, i + 1));
break;
}
else
{
posOfNSSep = i;
}
}
// fall through on purpose
default :
if (-1 == startSubstring)
{
startSubstring = i;
isNum = Character.isDigit(c);
}
else if (isNum)
{
isNum = Character.isDigit(c);
}
}
}
if (startSubstring != -1)
{
isNum = false;
isStartOfPat = mapPatternElemPos(nesting, isStartOfPat, isAttrName);
if ((-1 != posOfNSSep) ||
((m_namespaceContext != null) && (m_namespaceContext.handlesNullPrefixes())))
{
posOfNSSep = mapNSTokens(pat, startSubstring, posOfNSSep, nChars);
}
else
{
addToTokenQueue(pat.substring(startSubstring, nChars));
}
}
if (0 == m_compiler.getTokenQueueSize())
{
m_processor.error(XPATHErrorResources.ER_EMPTY_EXPRESSION, null); //"Empty expression!");
}
else if (null != targetStrings)
{
recordTokenString(targetStrings);
}
m_processor.m_queueMark = 0;
} | class class_name[name] begin[{]
method[tokenize, return_type[void], modifier[default], parameter[pat, targetStrings]] begin[{]
assign[member[m_compiler.m_currentPattern], member[.pat]]
assign[member[.m_patternMapSize], literal[0]]
local_variable[type[int], initTokQueueSize]
assign[member[m_compiler.m_opMap], ClassCreator(arguments=[MemberReference(member=initTokQueueSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=BLOCKTOKENQUEUESIZE, postfix_operators=[], prefix_operators=[], qualifier=OpMap, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), operator=*), MemberReference(member=MAPINDEX_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=OpMap, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OpMapVector, sub_type=None))]
local_variable[type[int], nChars]
local_variable[type[int], startSubstring]
local_variable[type[int], posOfNSSep]
local_variable[type[boolean], isStartOfPat]
local_variable[type[boolean], isAttrName]
local_variable[type[boolean], isNum]
local_variable[type[int], nesting]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=pat, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\"')], statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isStartOfPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=nesting, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isStartOfPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isAttrName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mapPatternElemPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isAttrName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operandr=MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=pat, selectors=[], type_arguments=None)], member=addToTokenQueue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=pat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mapNSTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), ForStatement(body=Statement(label=None), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nChars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=pat, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\"'), operator=!=), operator=&&), init=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])], update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\"'), operator===), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nChars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ER_EXPECTED_DOUBLE_QUOTE, postfix_operators=[], prefix_operators=[], qualifier=XPATHErrorResources, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=error, postfix_operators=[], prefix_operators=[], qualifier=m_processor, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=pat, selectors=[], type_arguments=None)], member=addToTokenQueue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\'')], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isStartOfPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=nesting, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isStartOfPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isAttrName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mapPatternElemPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isAttrName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operandr=MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=pat, selectors=[], type_arguments=None)], member=addToTokenQueue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=pat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mapNSTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), ForStatement(body=Statement(label=None), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nChars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=pat, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\''), operator=!=), operator=&&), init=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])], update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\''), operator===), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nChars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ER_EXPECTED_SINGLE_QUOTE, postfix_operators=[], prefix_operators=[], qualifier=XPATHErrorResources, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=error, postfix_operators=[], prefix_operators=[], qualifier=m_processor, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=pat, selectors=[], type_arguments=None)], member=addToTokenQueue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x0A), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x0D), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\t')], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isStartOfPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=nesting, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isStartOfPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isAttrName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mapPatternElemPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isAttrName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operandr=MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=pat, selectors=[], type_arguments=None)], member=addToTokenQueue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=pat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mapNSTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='@')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isAttrName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='-')], statements=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='-'), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)]))]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='('), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='['), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=')'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=']'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='|'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='/'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='*'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='+'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='='), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=','), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\\'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='^'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='!'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='$'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='<'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='>')], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='/'), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=MemberReference(member=isStartOfPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='*'), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isStartOfPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=nesting, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isStartOfPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isAttrName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mapPatternElemPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isAttrName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isStartOfPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=nesting, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isStartOfPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isAttrName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mapPatternElemPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isStartOfPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=nesting, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isStartOfPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isAttrName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mapPatternElemPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isAttrName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operandr=MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=pat, selectors=[], type_arguments=None)], member=addToTokenQueue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=pat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mapNSTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None)])), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operandr=MemberReference(member=nesting, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='|'), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=targetStrings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=targetStrings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recordTokenString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isStartOfPat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=')'), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=']'), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='('), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='['), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=nesting, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=nesting, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=pat, selectors=[], type_arguments=None)], member=addToTokenQueue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=':')], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, 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=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=<), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=pat, selectors=[], type_arguments=None)], member=addToTokenQueue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isAttrName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=posOfNSSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=pat, selectors=[], type_arguments=None)], member=addToTokenQueue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]))]))]), SwitchStatementCase(case=[], statements=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operandr=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=IfStatement(condition=MemberReference(member=isNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isDigit, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=startSubstring, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isDigit, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None)), label=None)]))])], expression=MemberReference(member=c, 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=nChars, 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)
if[binary_operation[member[.startSubstring], !=, literal[1]]] begin[{]
assign[member[.isNum], literal[false]]
assign[member[.isStartOfPat], call[.mapPatternElemPos, parameter[member[.nesting], member[.isStartOfPat], member[.isAttrName]]]]
if[binary_operation[binary_operation[literal[1], !=, member[.posOfNSSep]], ||, binary_operation[binary_operation[member[.m_namespaceContext], !=, literal[null]], &&, call[m_namespaceContext.handlesNullPrefixes, parameter[]]]]] begin[{]
assign[member[.posOfNSSep], call[.mapNSTokens, parameter[member[.pat], member[.startSubstring], member[.posOfNSSep], member[.nChars]]]]
else begin[{]
call[.addToTokenQueue, parameter[call[pat.substring, parameter[member[.startSubstring], member[.nChars]]]]]
end[}]
else begin[{]
None
end[}]
if[binary_operation[literal[0], ==, call[m_compiler.getTokenQueueSize, parameter[]]]] begin[{]
call[m_processor.error, parameter[member[XPATHErrorResources.ER_EMPTY_EXPRESSION], literal[null]]]
else begin[{]
if[binary_operation[literal[null], !=, member[.targetStrings]]] begin[{]
call[.recordTokenString, parameter[member[.targetStrings]]]
else begin[{]
None
end[}]
end[}]
assign[member[m_processor.m_queueMark], literal[0]]
end[}]
END[}] | Keyword[void] identifier[tokenize] operator[SEP] identifier[String] identifier[pat] , identifier[Vector] identifier[targetStrings] operator[SEP] Keyword[throws] identifier[javax] operator[SEP] identifier[xml] operator[SEP] identifier[transform] operator[SEP] identifier[TransformerException] {
identifier[m_compiler] operator[SEP] identifier[m_currentPattern] operator[=] identifier[pat] operator[SEP] identifier[m_patternMapSize] operator[=] Other[0] operator[SEP] Keyword[int] identifier[initTokQueueSize] operator[=] operator[SEP] operator[SEP] identifier[pat] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] identifier[OpMap] operator[SEP] identifier[MAXTOKENQUEUESIZE] operator[SEP] operator[?] identifier[pat] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[:] identifier[OpMap] operator[SEP] identifier[MAXTOKENQUEUESIZE] operator[SEP] operator[*] Other[5] operator[SEP] identifier[m_compiler] operator[SEP] identifier[m_opMap] operator[=] Keyword[new] identifier[OpMapVector] operator[SEP] identifier[initTokQueueSize] , identifier[OpMap] operator[SEP] identifier[BLOCKTOKENQUEUESIZE] operator[*] Other[5] , identifier[OpMap] operator[SEP] identifier[MAPINDEX_LENGTH] operator[SEP] operator[SEP] Keyword[int] identifier[nChars] operator[=] identifier[pat] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[startSubstring] operator[=] operator[-] Other[1] operator[SEP] Keyword[int] identifier[posOfNSSep] operator[=] operator[-] Other[1] operator[SEP] Keyword[boolean] identifier[isStartOfPat] operator[=] literal[boolean] operator[SEP] Keyword[boolean] identifier[isAttrName] operator[=] literal[boolean] operator[SEP] Keyword[boolean] identifier[isNum] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[nesting] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[nChars] operator[SEP] identifier[i] operator[++] operator[SEP] {
Keyword[char] identifier[c] operator[=] identifier[pat] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[c] operator[SEP] {
Keyword[case] literal[String] operator[:] {
Keyword[if] operator[SEP] identifier[startSubstring] operator[!=] operator[-] Other[1] operator[SEP] {
identifier[isNum] operator[=] literal[boolean] operator[SEP] identifier[isStartOfPat] operator[=] identifier[mapPatternElemPos] operator[SEP] identifier[nesting] , identifier[isStartOfPat] , identifier[isAttrName] operator[SEP] operator[SEP] identifier[isAttrName] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[-] Other[1] operator[!=] identifier[posOfNSSep] operator[SEP] {
identifier[posOfNSSep] operator[=] identifier[mapNSTokens] operator[SEP] identifier[pat] , identifier[startSubstring] , identifier[posOfNSSep] , identifier[i] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[addToTokenQueue] operator[SEP] identifier[pat] operator[SEP] identifier[substring] operator[SEP] identifier[startSubstring] , identifier[i] operator[SEP] operator[SEP] operator[SEP]
}
}
identifier[startSubstring] operator[=] identifier[i] operator[SEP] Keyword[for] operator[SEP] identifier[i] operator[++] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[nChars] operator[SEP] operator[&&] operator[SEP] operator[SEP] identifier[c] operator[=] identifier[pat] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[!=] literal[String] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[&&] identifier[i] operator[<] identifier[nChars] operator[SEP] {
identifier[addToTokenQueue] operator[SEP] identifier[pat] operator[SEP] identifier[substring] operator[SEP] identifier[startSubstring] , identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[startSubstring] operator[=] operator[-] Other[1] operator[SEP]
}
Keyword[else] {
identifier[m_processor] operator[SEP] identifier[error] operator[SEP] identifier[XPATHErrorResources] operator[SEP] identifier[ER_EXPECTED_DOUBLE_QUOTE] , Other[null] operator[SEP] operator[SEP]
}
}
Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] Keyword[if] operator[SEP] identifier[startSubstring] operator[!=] operator[-] Other[1] operator[SEP] {
identifier[isNum] operator[=] literal[boolean] operator[SEP] identifier[isStartOfPat] operator[=] identifier[mapPatternElemPos] operator[SEP] identifier[nesting] , identifier[isStartOfPat] , identifier[isAttrName] operator[SEP] operator[SEP] identifier[isAttrName] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[-] Other[1] operator[!=] identifier[posOfNSSep] operator[SEP] {
identifier[posOfNSSep] operator[=] identifier[mapNSTokens] operator[SEP] identifier[pat] , identifier[startSubstring] , identifier[posOfNSSep] , identifier[i] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[addToTokenQueue] operator[SEP] identifier[pat] operator[SEP] identifier[substring] operator[SEP] identifier[startSubstring] , identifier[i] operator[SEP] operator[SEP] operator[SEP]
}
}
identifier[startSubstring] operator[=] identifier[i] operator[SEP] Keyword[for] operator[SEP] identifier[i] operator[++] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[nChars] operator[SEP] operator[&&] operator[SEP] operator[SEP] identifier[c] operator[=] identifier[pat] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[!=] literal[String] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[&&] identifier[i] operator[<] identifier[nChars] operator[SEP] {
identifier[addToTokenQueue] operator[SEP] identifier[pat] operator[SEP] identifier[substring] operator[SEP] identifier[startSubstring] , identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[startSubstring] operator[=] operator[-] Other[1] operator[SEP]
}
Keyword[else] {
identifier[m_processor] operator[SEP] identifier[error] operator[SEP] identifier[XPATHErrorResources] operator[SEP] identifier[ER_EXPECTED_SINGLE_QUOTE] , Other[null] operator[SEP] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] literal[Integer] operator[:] Keyword[case] literal[Integer] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[if] operator[SEP] identifier[startSubstring] operator[!=] operator[-] Other[1] operator[SEP] {
identifier[isNum] operator[=] literal[boolean] operator[SEP] identifier[isStartOfPat] operator[=] identifier[mapPatternElemPos] operator[SEP] identifier[nesting] , identifier[isStartOfPat] , identifier[isAttrName] operator[SEP] operator[SEP] identifier[isAttrName] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[-] Other[1] operator[!=] identifier[posOfNSSep] operator[SEP] {
identifier[posOfNSSep] operator[=] identifier[mapNSTokens] operator[SEP] identifier[pat] , identifier[startSubstring] , identifier[posOfNSSep] , identifier[i] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[addToTokenQueue] operator[SEP] identifier[pat] operator[SEP] identifier[substring] operator[SEP] identifier[startSubstring] , identifier[i] operator[SEP] operator[SEP] operator[SEP]
}
identifier[startSubstring] operator[=] operator[-] Other[1] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[isAttrName] operator[=] literal[boolean] operator[SEP] Keyword[case] literal[String] operator[:] Keyword[if] operator[SEP] literal[String] operator[==] identifier[c] operator[SEP] {
Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[isNum] operator[||] operator[SEP] identifier[startSubstring] operator[==] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] {
Keyword[break] operator[SEP]
}
identifier[isNum] operator[=] literal[boolean] operator[SEP]
}
Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[if] operator[SEP] identifier[startSubstring] operator[!=] operator[-] Other[1] operator[SEP] {
identifier[isNum] operator[=] literal[boolean] operator[SEP] identifier[isStartOfPat] operator[=] identifier[mapPatternElemPos] operator[SEP] identifier[nesting] , identifier[isStartOfPat] , identifier[isAttrName] operator[SEP] operator[SEP] identifier[isAttrName] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[-] Other[1] operator[!=] identifier[posOfNSSep] operator[SEP] {
identifier[posOfNSSep] operator[=] identifier[mapNSTokens] operator[SEP] identifier[pat] , identifier[startSubstring] , identifier[posOfNSSep] , identifier[i] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[addToTokenQueue] operator[SEP] identifier[pat] operator[SEP] identifier[substring] operator[SEP] identifier[startSubstring] , identifier[i] operator[SEP] operator[SEP] operator[SEP]
}
identifier[startSubstring] operator[=] operator[-] Other[1] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] operator[SEP] literal[String] operator[==] identifier[c] operator[SEP] operator[&&] identifier[isStartOfPat] operator[SEP] {
identifier[isStartOfPat] operator[=] identifier[mapPatternElemPos] operator[SEP] identifier[nesting] , identifier[isStartOfPat] , identifier[isAttrName] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] literal[String] operator[==] identifier[c] operator[SEP] {
identifier[isStartOfPat] operator[=] identifier[mapPatternElemPos] operator[SEP] identifier[nesting] , identifier[isStartOfPat] , identifier[isAttrName] operator[SEP] operator[SEP] identifier[isAttrName] operator[=] literal[boolean] operator[SEP]
}
Keyword[if] operator[SEP] Other[0] operator[==] identifier[nesting] operator[SEP] {
Keyword[if] operator[SEP] literal[String] operator[==] identifier[c] operator[SEP] {
Keyword[if] operator[SEP] Other[null] operator[!=] identifier[targetStrings] operator[SEP] {
identifier[recordTokenString] operator[SEP] identifier[targetStrings] operator[SEP] operator[SEP]
}
identifier[isStartOfPat] operator[=] literal[boolean] operator[SEP]
}
}
Keyword[if] operator[SEP] operator[SEP] literal[String] operator[==] identifier[c] operator[SEP] operator[||] operator[SEP] literal[String] operator[==] identifier[c] operator[SEP] operator[SEP] {
identifier[nesting] operator[--] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] operator[SEP] literal[String] operator[==] identifier[c] operator[SEP] operator[||] operator[SEP] literal[String] operator[==] identifier[c] operator[SEP] operator[SEP] {
identifier[nesting] operator[++] operator[SEP]
}
identifier[addToTokenQueue] operator[SEP] identifier[pat] operator[SEP] identifier[substring] operator[SEP] identifier[i] , identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] Keyword[if] operator[SEP] identifier[i] operator[>] Other[0] operator[SEP] {
Keyword[if] operator[SEP] identifier[posOfNSSep] operator[==] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[startSubstring] operator[!=] operator[-] Other[1] operator[SEP] {
Keyword[if] operator[SEP] identifier[startSubstring] operator[<] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] identifier[addToTokenQueue] operator[SEP] identifier[pat] operator[SEP] identifier[substring] operator[SEP] identifier[startSubstring] , identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP]
}
identifier[isNum] operator[=] literal[boolean] operator[SEP] identifier[isAttrName] operator[=] literal[boolean] operator[SEP] identifier[startSubstring] operator[=] operator[-] Other[1] operator[SEP] identifier[posOfNSSep] operator[=] operator[-] Other[1] operator[SEP] identifier[addToTokenQueue] operator[SEP] identifier[pat] operator[SEP] identifier[substring] operator[SEP] identifier[i] operator[-] Other[1] , identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP]
}
Keyword[else] {
identifier[posOfNSSep] operator[=] identifier[i] operator[SEP]
}
}
Keyword[default] operator[:] Keyword[if] operator[SEP] operator[-] Other[1] operator[==] identifier[startSubstring] operator[SEP] {
identifier[startSubstring] operator[=] identifier[i] operator[SEP] identifier[isNum] operator[=] identifier[Character] operator[SEP] identifier[isDigit] operator[SEP] identifier[c] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[isNum] operator[SEP] {
identifier[isNum] operator[=] identifier[Character] operator[SEP] identifier[isDigit] operator[SEP] identifier[c] operator[SEP] operator[SEP]
}
}
}
Keyword[if] operator[SEP] identifier[startSubstring] operator[!=] operator[-] Other[1] operator[SEP] {
identifier[isNum] operator[=] literal[boolean] operator[SEP] identifier[isStartOfPat] operator[=] identifier[mapPatternElemPos] operator[SEP] identifier[nesting] , identifier[isStartOfPat] , identifier[isAttrName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] operator[-] Other[1] operator[!=] identifier[posOfNSSep] operator[SEP] operator[||] operator[SEP] operator[SEP] identifier[m_namespaceContext] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[m_namespaceContext] operator[SEP] identifier[handlesNullPrefixes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[posOfNSSep] operator[=] identifier[mapNSTokens] operator[SEP] identifier[pat] , identifier[startSubstring] , identifier[posOfNSSep] , identifier[nChars] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[addToTokenQueue] operator[SEP] identifier[pat] operator[SEP] identifier[substring] operator[SEP] identifier[startSubstring] , identifier[nChars] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] Other[0] operator[==] identifier[m_compiler] operator[SEP] identifier[getTokenQueueSize] operator[SEP] operator[SEP] operator[SEP] {
identifier[m_processor] operator[SEP] identifier[error] operator[SEP] identifier[XPATHErrorResources] operator[SEP] identifier[ER_EMPTY_EXPRESSION] , Other[null] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[targetStrings] operator[SEP] {
identifier[recordTokenString] operator[SEP] identifier[targetStrings] operator[SEP] operator[SEP]
}
identifier[m_processor] operator[SEP] identifier[m_queueMark] operator[=] Other[0] operator[SEP]
}
|
protected Message getCheckMessage( String name )
{
PlainOldFixture plainOldFixture = new PlainOldFixture( target );
if ( plainOldFixture.canCheck( name ) )
{
return plainOldFixture.check( name );
}
return getMessage(name, true, true);
} | class class_name[name] begin[{]
method[getCheckMessage, return_type[type[Message]], modifier[protected], parameter[name]] begin[{]
local_variable[type[PlainOldFixture], plainOldFixture]
if[call[plainOldFixture.canCheck, parameter[member[.name]]]] begin[{]
return[call[plainOldFixture.check, parameter[member[.name]]]]
else begin[{]
None
end[}]
return[call[.getMessage, parameter[member[.name], literal[true], literal[true]]]]
end[}]
END[}] | Keyword[protected] identifier[Message] identifier[getCheckMessage] operator[SEP] identifier[String] identifier[name] operator[SEP] {
identifier[PlainOldFixture] identifier[plainOldFixture] operator[=] Keyword[new] identifier[PlainOldFixture] operator[SEP] identifier[target] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[plainOldFixture] operator[SEP] identifier[canCheck] operator[SEP] identifier[name] operator[SEP] operator[SEP] {
Keyword[return] identifier[plainOldFixture] operator[SEP] identifier[check] operator[SEP] identifier[name] operator[SEP] operator[SEP]
}
Keyword[return] identifier[getMessage] operator[SEP] identifier[name] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP]
}
|
public void addScriptFunction(ScriptPlacement placement, String script)
{
assert (script != null) : "The paramter 'script' must not be null";
IScriptReporter sr = getParentScriptReporter();
if (sr != null) {
sr.addScriptFunction(placement, script);
return;
}
// get the list of function blocks and add this script to it.
if (placement == null || placement == ScriptPlacement.PLACE_INFRAMEWORK) {
if (_funcBlocks == null) {
_funcBlocks = new ArrayList/*<String>*/();
}
assert (_funcBlocks != null) : "_funcBlocks should not be null";
_funcBlocks.add(script);
}
else if (placement == ScriptPlacement.PLACE_BEFORE) {
if (_codeBefore == null)
_codeBefore = new ArrayList/*<String>*/();
_codeBefore.add(script);
}
else if (placement == ScriptPlacement.PLACE_AFTER) {
if (_codeAfter == null)
_codeAfter = new ArrayList/*<String>*/();
_codeAfter.add(script);
}
else {
assert(false) : "unsupported placement:" + placement;
}
} | class class_name[name] begin[{]
method[addScriptFunction, return_type[void], modifier[public], parameter[placement, script]] begin[{]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=script, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The paramter 'script' must not be null"))
local_variable[type[IScriptReporter], sr]
if[binary_operation[member[.sr], !=, literal[null]]] begin[{]
call[sr.addScriptFunction, parameter[member[.placement], member[.script]]]
return[None]
else begin[{]
None
end[}]
if[binary_operation[binary_operation[member[.placement], ==, literal[null]], ||, binary_operation[member[.placement], ==, member[ScriptPlacement.PLACE_INFRAMEWORK]]]] begin[{]
if[binary_operation[member[._funcBlocks], ==, literal[null]]] begin[{]
assign[member[._funcBlocks], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArrayList, sub_type=None))]
else begin[{]
None
end[}]
AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=_funcBlocks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="_funcBlocks should not be null"))
call[_funcBlocks.add, parameter[member[.script]]]
else begin[{]
if[binary_operation[member[.placement], ==, member[ScriptPlacement.PLACE_BEFORE]]] begin[{]
if[binary_operation[member[._codeBefore], ==, literal[null]]] begin[{]
assign[member[._codeBefore], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArrayList, sub_type=None))]
else begin[{]
None
end[}]
call[_codeBefore.add, parameter[member[.script]]]
else begin[{]
if[binary_operation[member[.placement], ==, member[ScriptPlacement.PLACE_AFTER]]] begin[{]
if[binary_operation[member[._codeAfter], ==, literal[null]]] begin[{]
assign[member[._codeAfter], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArrayList, sub_type=None))]
else begin[{]
None
end[}]
call[_codeAfter.add, parameter[member[.script]]]
else begin[{]
AssertStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unsupported placement:"), operandr=MemberReference(member=placement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))
end[}]
end[}]
end[}]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[addScriptFunction] operator[SEP] identifier[ScriptPlacement] identifier[placement] , identifier[String] identifier[script] operator[SEP] {
Keyword[assert] operator[SEP] identifier[script] operator[!=] Other[null] operator[SEP] operator[:] literal[String] operator[SEP] identifier[IScriptReporter] identifier[sr] operator[=] identifier[getParentScriptReporter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sr] operator[!=] Other[null] operator[SEP] {
identifier[sr] operator[SEP] identifier[addScriptFunction] operator[SEP] identifier[placement] , identifier[script] operator[SEP] operator[SEP] Keyword[return] operator[SEP]
}
Keyword[if] operator[SEP] identifier[placement] operator[==] Other[null] operator[||] identifier[placement] operator[==] identifier[ScriptPlacement] operator[SEP] identifier[PLACE_INFRAMEWORK] operator[SEP] {
Keyword[if] operator[SEP] identifier[_funcBlocks] operator[==] Other[null] operator[SEP] {
identifier[_funcBlocks] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[assert] operator[SEP] identifier[_funcBlocks] operator[!=] Other[null] operator[SEP] operator[:] literal[String] operator[SEP] identifier[_funcBlocks] operator[SEP] identifier[add] operator[SEP] identifier[script] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[placement] operator[==] identifier[ScriptPlacement] operator[SEP] identifier[PLACE_BEFORE] operator[SEP] {
Keyword[if] operator[SEP] identifier[_codeBefore] operator[==] Other[null] operator[SEP] identifier[_codeBefore] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[_codeBefore] operator[SEP] identifier[add] operator[SEP] identifier[script] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[placement] operator[==] identifier[ScriptPlacement] operator[SEP] identifier[PLACE_AFTER] operator[SEP] {
Keyword[if] operator[SEP] identifier[_codeAfter] operator[==] Other[null] operator[SEP] identifier[_codeAfter] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[_codeAfter] operator[SEP] identifier[add] operator[SEP] identifier[script] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[assert] operator[SEP] literal[boolean] operator[SEP] operator[:] literal[String] operator[+] identifier[placement] operator[SEP]
}
}
|
public void changeField(PrefabValues prefabValues, TypeTag enclosingType) {
modify(() -> {
Object newValue = prefabValues.giveOther(TypeTag.of(field, enclosingType), field.get(object));
field.set(object, newValue);
}, false);
} | class class_name[name] begin[{]
method[changeField, return_type[void], modifier[public], parameter[prefabValues, enclosingType]] begin[{]
call[.modify, parameter[LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=enclosingType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=TypeTag, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None)], member=giveOther, postfix_operators=[], prefix_operators=[], qualifier=prefabValues, selectors=[], type_arguments=None), name=newValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), label=None)], parameters=[]), literal[false]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[changeField] operator[SEP] identifier[PrefabValues] identifier[prefabValues] , identifier[TypeTag] identifier[enclosingType] operator[SEP] {
identifier[modify] operator[SEP] operator[SEP] operator[SEP] operator[->] {
identifier[Object] identifier[newValue] operator[=] identifier[prefabValues] operator[SEP] identifier[giveOther] operator[SEP] identifier[TypeTag] operator[SEP] identifier[of] operator[SEP] identifier[field] , identifier[enclosingType] operator[SEP] , identifier[field] operator[SEP] identifier[get] operator[SEP] identifier[object] operator[SEP] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[set] operator[SEP] identifier[object] , identifier[newValue] operator[SEP] operator[SEP]
} , literal[boolean] operator[SEP] operator[SEP]
}
|
@Override
public ListSecretVersionIdsResult listSecretVersionIds(ListSecretVersionIdsRequest request) {
request = beforeClientExecution(request);
return executeListSecretVersionIds(request);
} | class class_name[name] begin[{]
method[listSecretVersionIds, return_type[type[ListSecretVersionIdsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeListSecretVersionIds, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[ListSecretVersionIdsResult] identifier[listSecretVersionIds] operator[SEP] identifier[ListSecretVersionIdsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeListSecretVersionIds] operator[SEP] identifier[request] operator[SEP] operator[SEP]
}
|
static CLICommand setCurrent(CLICommand cmd) {
CLICommand old = getCurrent();
CURRENT_COMMAND.set(cmd);
return old;
} | class class_name[name] begin[{]
method[setCurrent, return_type[type[CLICommand]], modifier[static], parameter[cmd]] begin[{]
local_variable[type[CLICommand], old]
call[CURRENT_COMMAND.set, parameter[member[.cmd]]]
return[member[.old]]
end[}]
END[}] | Keyword[static] identifier[CLICommand] identifier[setCurrent] operator[SEP] identifier[CLICommand] identifier[cmd] operator[SEP] {
identifier[CLICommand] identifier[old] operator[=] identifier[getCurrent] operator[SEP] operator[SEP] operator[SEP] identifier[CURRENT_COMMAND] operator[SEP] identifier[set] operator[SEP] identifier[cmd] operator[SEP] operator[SEP] Keyword[return] identifier[old] operator[SEP]
}
|
public void marshall(StopJobRequest stopJobRequest, ProtocolMarshaller protocolMarshaller) {
if (stopJobRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(stopJobRequest.getAppId(), APPID_BINDING);
protocolMarshaller.marshall(stopJobRequest.getBranchName(), BRANCHNAME_BINDING);
protocolMarshaller.marshall(stopJobRequest.getJobId(), JOBID_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
} | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[stopJobRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.stopJobRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)
else begin[{]
None
end[}]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAppId, postfix_operators=[], prefix_operators=[], qualifier=stopJobRequest, selectors=[], type_arguments=None), MemberReference(member=APPID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBranchName, postfix_operators=[], prefix_operators=[], qualifier=stopJobRequest, selectors=[], type_arguments=None), MemberReference(member=BRANCHNAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getJobId, postfix_operators=[], prefix_operators=[], qualifier=stopJobRequest, selectors=[], type_arguments=None), MemberReference(member=JOBID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)
end[}]
END[}] | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[StopJobRequest] identifier[stopJobRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[stopJobRequest] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[try] {
identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[stopJobRequest] operator[SEP] identifier[getAppId] operator[SEP] operator[SEP] , identifier[APPID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[stopJobRequest] operator[SEP] identifier[getBranchName] operator[SEP] operator[SEP] , identifier[BRANCHNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[stopJobRequest] operator[SEP] identifier[getJobId] operator[SEP] operator[SEP] , identifier[JOBID_BINDING] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] {
Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP]
}
}
|
@Override
public <T> BulkFuture<Map<String, T>> asyncGetBulk(Iterator<String> keyIter,
Transcoder<T> tc) {
return asyncGetBulk(keyIter,
new SingleElementInfiniteIterator<Transcoder<T>>(tc));
} | class class_name[name] begin[{]
method[asyncGetBulk, return_type[type[BulkFuture]], modifier[public], parameter[keyIter, tc]] begin[{]
return[call[.asyncGetBulk, parameter[member[.keyIter], ClassCreator(arguments=[MemberReference(member=tc, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Transcoder, sub_type=None))], dimensions=None, name=SingleElementInfiniteIterator, sub_type=None))]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[BulkFuture] operator[<] identifier[Map] operator[<] identifier[String] , identifier[T] operator[>] operator[>] identifier[asyncGetBulk] operator[SEP] identifier[Iterator] operator[<] identifier[String] operator[>] identifier[keyIter] , identifier[Transcoder] operator[<] identifier[T] operator[>] identifier[tc] operator[SEP] {
Keyword[return] identifier[asyncGetBulk] operator[SEP] identifier[keyIter] , Keyword[new] identifier[SingleElementInfiniteIterator] operator[<] identifier[Transcoder] operator[<] identifier[T] operator[>] operator[>] operator[SEP] identifier[tc] operator[SEP] operator[SEP] operator[SEP]
}
|
public double getPower(double[] signal, int offset) {
int M = hamming.length + offset;
//hamming window
for (int i = offset; i < M; i++) {
signal[i] *= hamming[i-offset];
}
//Goertzel filter
double d1 = 0.0;
double d2 = 0.0;
double y = 0;
for (int n = offset; n < M; ++n) {
y = signal[n] + rw*d1 - d2;
d2 = d1;
d1 = y;
}
double resultr = 0.5*rw*d1 - d2;
double resulti = iw*d1;
return Math.sqrt( (resultr * resultr) + (resulti * resulti));
} | class class_name[name] begin[{]
method[getPower, return_type[type[double]], modifier[public], parameter[signal, offset]] begin[{]
local_variable[type[int], M]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=signal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=*=, value=MemberReference(member=hamming, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=M, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
local_variable[type[double], d1]
local_variable[type[double], d2]
local_variable[type[double], y]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=signal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=BinaryOperation(operandl=MemberReference(member=rw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=d1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+), operandr=MemberReference(member=d2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=d2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=d1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=d1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=M, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=n)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=n, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None)
local_variable[type[double], resultr]
local_variable[type[double], resulti]
return[call[Math.sqrt, parameter[binary_operation[binary_operation[member[.resultr], *, member[.resultr]], +, binary_operation[member[.resulti], *, member[.resulti]]]]]]
end[}]
END[}] | Keyword[public] Keyword[double] identifier[getPower] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[signal] , Keyword[int] identifier[offset] operator[SEP] {
Keyword[int] identifier[M] operator[=] identifier[hamming] operator[SEP] identifier[length] operator[+] identifier[offset] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[offset] operator[SEP] identifier[i] operator[<] identifier[M] operator[SEP] identifier[i] operator[++] operator[SEP] {
identifier[signal] operator[SEP] identifier[i] operator[SEP] operator[*=] identifier[hamming] operator[SEP] identifier[i] operator[-] identifier[offset] operator[SEP] operator[SEP]
}
Keyword[double] identifier[d1] operator[=] literal[Float] operator[SEP] Keyword[double] identifier[d2] operator[=] literal[Float] operator[SEP] Keyword[double] identifier[y] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[n] operator[=] identifier[offset] operator[SEP] identifier[n] operator[<] identifier[M] operator[SEP] operator[++] identifier[n] operator[SEP] {
identifier[y] operator[=] identifier[signal] operator[SEP] identifier[n] operator[SEP] operator[+] identifier[rw] operator[*] identifier[d1] operator[-] identifier[d2] operator[SEP] identifier[d2] operator[=] identifier[d1] operator[SEP] identifier[d1] operator[=] identifier[y] operator[SEP]
}
Keyword[double] identifier[resultr] operator[=] literal[Float] operator[*] identifier[rw] operator[*] identifier[d1] operator[-] identifier[d2] operator[SEP] Keyword[double] identifier[resulti] operator[=] identifier[iw] operator[*] identifier[d1] operator[SEP] Keyword[return] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] operator[SEP] identifier[resultr] operator[*] identifier[resultr] operator[SEP] operator[+] operator[SEP] identifier[resulti] operator[*] identifier[resulti] operator[SEP] operator[SEP] operator[SEP]
}
|
public void init(JavacTask task, String[] args, boolean addTaskListener) {
env = new Env();
for (int i = 0; i < args.length; i++) {
String arg = args[i];
if (arg.equals(XMSGS_OPTION)) {
env.messages.setOptions(null);
} else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) {
env.messages.setOptions(arg.substring(arg.indexOf(":") + 1));
} else if (arg.matches(XIMPLICIT_HEADERS + "[1-6]")) {
char ch = arg.charAt(arg.length() - 1);
env.setImplicitHeaders(Character.digit(ch, 10));
} else if (arg.startsWith(XCUSTOM_TAGS_PREFIX)) {
env.setCustomTags(arg.substring(arg.indexOf(":") + 1));
} else
throw new IllegalArgumentException(arg);
}
env.init(task);
checker = new Checker(env);
if (addTaskListener) {
final DeclScanner ds = new DeclScanner() {
@Override
void visitDecl(Tree tree, Name name) {
TreePath p = getCurrentPath();
DocCommentTree dc = env.trees.getDocCommentTree(p);
checker.scan(dc, p);
}
};
TaskListener tl = new TaskListener() {
@Override
public void started(TaskEvent e) {
switch (e.getKind()) {
case ANALYZE:
CompilationUnitTree tree;
while ((tree = todo.poll()) != null)
ds.scan(tree, null);
break;
}
}
@Override
public void finished(TaskEvent e) {
switch (e.getKind()) {
case PARSE:
todo.add(e.getCompilationUnit());
break;
}
}
Queue<CompilationUnitTree> todo = new LinkedList<CompilationUnitTree>();
};
task.addTaskListener(tl);
}
} | class class_name[name] begin[{]
method[init, return_type[void], modifier[public], parameter[task, args, addTaskListener]] begin[{]
assign[member[.env], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Env, sub_type=None))]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=arg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=XMSGS_OPTION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=XMSGS_CUSTOM_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=XIMPLICIT_HEADERS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[1-6]"), operator=+)], member=matches, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=XCUSTOM_TAGS_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)], member=setCustomTags, postfix_operators=[], prefix_operators=[], qualifier=env, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), name=ch)], modifiers=set(), type=BasicType(dimensions=[], name=char)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10)], member=digit, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None)], member=setImplicitHeaders, postfix_operators=[], prefix_operators=[], qualifier=env, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)], member=setOptions, postfix_operators=[], prefix_operators=[], qualifier=env.messages, 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=null)], member=setOptions, postfix_operators=[], prefix_operators=[], qualifier=env.messages, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=args, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
call[env.init, parameter[member[.task]]]
assign[member[.checker], ClassCreator(arguments=[MemberReference(member=env, 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=Checker, sub_type=None))]
if[member[.addTaskListener]] begin[{]
local_variable[type[DeclScanner], ds]
local_variable[type[TaskListener], tl]
call[task.addTaskListener, parameter[member[.tl]]]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[JavacTask] identifier[task] , identifier[String] operator[SEP] operator[SEP] identifier[args] , Keyword[boolean] identifier[addTaskListener] operator[SEP] {
identifier[env] operator[=] Keyword[new] identifier[Env] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[args] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] {
identifier[String] identifier[arg] operator[=] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[equals] operator[SEP] identifier[XMSGS_OPTION] operator[SEP] operator[SEP] {
identifier[env] operator[SEP] identifier[messages] operator[SEP] identifier[setOptions] operator[SEP] Other[null] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[XMSGS_CUSTOM_PREFIX] operator[SEP] operator[SEP] {
identifier[env] operator[SEP] identifier[messages] operator[SEP] identifier[setOptions] operator[SEP] identifier[arg] operator[SEP] identifier[substring] operator[SEP] identifier[arg] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[matches] operator[SEP] identifier[XIMPLICIT_HEADERS] operator[+] literal[String] operator[SEP] operator[SEP] {
Keyword[char] identifier[ch] operator[=] identifier[arg] operator[SEP] identifier[charAt] operator[SEP] identifier[arg] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[env] operator[SEP] identifier[setImplicitHeaders] operator[SEP] identifier[Character] operator[SEP] identifier[digit] operator[SEP] identifier[ch] , Other[10] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[XCUSTOM_TAGS_PREFIX] operator[SEP] operator[SEP] {
identifier[env] operator[SEP] identifier[setCustomTags] operator[SEP] identifier[arg] operator[SEP] identifier[substring] operator[SEP] identifier[arg] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[arg] operator[SEP] operator[SEP]
}
identifier[env] operator[SEP] identifier[init] operator[SEP] identifier[task] operator[SEP] operator[SEP] identifier[checker] operator[=] Keyword[new] identifier[Checker] operator[SEP] identifier[env] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[addTaskListener] operator[SEP] {
Keyword[final] identifier[DeclScanner] identifier[ds] operator[=] Keyword[new] identifier[DeclScanner] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[void] identifier[visitDecl] operator[SEP] identifier[Tree] identifier[tree] , identifier[Name] identifier[name] operator[SEP] {
identifier[TreePath] identifier[p] operator[=] identifier[getCurrentPath] operator[SEP] operator[SEP] operator[SEP] identifier[DocCommentTree] identifier[dc] operator[=] identifier[env] operator[SEP] identifier[trees] operator[SEP] identifier[getDocCommentTree] operator[SEP] identifier[p] operator[SEP] operator[SEP] identifier[checker] operator[SEP] identifier[scan] operator[SEP] identifier[dc] , identifier[p] operator[SEP] operator[SEP]
}
} operator[SEP] identifier[TaskListener] identifier[tl] operator[=] Keyword[new] identifier[TaskListener] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[started] operator[SEP] identifier[TaskEvent] identifier[e] operator[SEP] {
Keyword[switch] operator[SEP] identifier[e] operator[SEP] identifier[getKind] operator[SEP] operator[SEP] operator[SEP] {
Keyword[case] identifier[ANALYZE] operator[:] identifier[CompilationUnitTree] identifier[tree] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[tree] operator[=] identifier[todo] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] identifier[ds] operator[SEP] identifier[scan] operator[SEP] identifier[tree] , Other[null] operator[SEP] operator[SEP] Keyword[break] operator[SEP]
}
} annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[finished] operator[SEP] identifier[TaskEvent] identifier[e] operator[SEP] {
Keyword[switch] operator[SEP] identifier[e] operator[SEP] identifier[getKind] operator[SEP] operator[SEP] operator[SEP] {
Keyword[case] identifier[PARSE] operator[:] identifier[todo] operator[SEP] identifier[add] operator[SEP] identifier[e] operator[SEP] identifier[getCompilationUnit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP]
}
}
identifier[Queue] operator[<] identifier[CompilationUnitTree] operator[>] identifier[todo] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[CompilationUnitTree] operator[>] operator[SEP] operator[SEP] operator[SEP]
} operator[SEP] identifier[task] operator[SEP] identifier[addTaskListener] operator[SEP] identifier[tl] operator[SEP] operator[SEP]
}
}
|
public static boolean ofType(int specific, int general) {
if (general == specific) {
return true;
}
switch (general) {
case ANY:
return true;
case NOT_EOF:
return specific >= UNKNOWN && specific <= SYNTH_VARIABLE_DECLARATION;
case GENERAL_END_OF_STATEMENT:
switch (specific) {
case EOF:
case NEWLINE:
case SEMICOLON:
return true;
}
break;
case ANY_END_OF_STATEMENT:
switch (specific) {
case EOF:
case NEWLINE:
case SEMICOLON:
case RIGHT_CURLY_BRACE:
return true;
}
break;
case ASSIGNMENT_OPERATOR:
return specific == EQUAL || (specific >= PLUS_EQUAL && specific <= ELVIS_EQUAL) || (specific >= LOGICAL_OR_EQUAL && specific <= LOGICAL_AND_EQUAL)
|| (specific >= LEFT_SHIFT_EQUAL && specific <= RIGHT_SHIFT_UNSIGNED_EQUAL)
|| (specific >= BITWISE_OR_EQUAL && specific <= BITWISE_XOR_EQUAL);
case COMPARISON_OPERATOR:
return specific >= COMPARE_NOT_EQUAL && specific <= COMPARE_TO;
case MATH_OPERATOR:
return (specific >= PLUS && specific <= RIGHT_SHIFT_UNSIGNED) || (specific >= NOT && specific <= LOGICAL_AND)
|| (specific >= BITWISE_OR && specific <= BITWISE_XOR);
case LOGICAL_OPERATOR:
return specific >= NOT && specific <= LOGICAL_AND;
case BITWISE_OPERATOR:
return (specific >= BITWISE_OR && specific <= BITWISE_XOR) || specific == BITWISE_NEGATION;
case RANGE_OPERATOR:
return specific == DOT_DOT || specific == DOT_DOT_DOT;
case REGEX_COMPARISON_OPERATOR:
return specific == FIND_REGEX || specific == MATCH_REGEX;
case DEREFERENCE_OPERATOR:
return specific == DOT || specific == NAVIGATE;
case PREFIX_OPERATOR:
switch (specific) {
case MINUS:
case PLUS_PLUS:
case MINUS_MINUS:
return true;
}
/* FALL THROUGH */
case PURE_PREFIX_OPERATOR:
switch (specific) {
case REGEX_PATTERN:
case NOT:
case PREFIX_PLUS:
case PREFIX_PLUS_PLUS:
case PREFIX_MINUS:
case PREFIX_MINUS_MINUS:
case SYNTH_CAST:
return true;
}
break;
case POSTFIX_OPERATOR:
switch (specific) {
case PLUS_PLUS:
case POSTFIX_PLUS_PLUS:
case MINUS_MINUS:
case POSTFIX_MINUS_MINUS:
return true;
}
break;
case INFIX_OPERATOR:
switch (specific) {
case DOT:
case NAVIGATE:
case LOGICAL_OR:
case LOGICAL_AND:
case BITWISE_OR:
case BITWISE_AND:
case BITWISE_XOR:
case LEFT_SHIFT:
case RIGHT_SHIFT:
case RIGHT_SHIFT_UNSIGNED:
case FIND_REGEX:
case MATCH_REGEX:
case DOT_DOT:
case DOT_DOT_DOT:
case KEYWORD_INSTANCEOF:
return true;
}
return (specific >= COMPARE_NOT_EQUAL && specific <= COMPARE_TO) || (specific >= PLUS && specific <= MOD_EQUAL) || specific == EQUAL || (specific >= PLUS_EQUAL && specific <= ELVIS_EQUAL) || (specific >= LOGICAL_OR_EQUAL && specific <= LOGICAL_AND_EQUAL)
|| (specific >= LEFT_SHIFT_EQUAL && specific <= RIGHT_SHIFT_UNSIGNED_EQUAL) || (specific >= BITWISE_OR_EQUAL && specific <= BITWISE_XOR_EQUAL);
case PREFIX_OR_INFIX_OPERATOR:
switch (specific) {
case POWER:
case PLUS:
case MINUS:
case PREFIX_PLUS:
case PREFIX_MINUS:
return true;
}
break;
case KEYWORD:
return specific >= KEYWORD_PRIVATE && specific <= KEYWORD_GOTO;
case SYMBOL:
return specific >= NEWLINE && specific <= PIPE;
case LITERAL:
case LITERAL_EXPRESSION:
return specific >= STRING && specific <= DECIMAL_NUMBER;
case NUMBER:
return specific == INTEGER_NUMBER || specific == DECIMAL_NUMBER;
case SIGN:
switch (specific) {
case PLUS:
case MINUS:
return true;
}
break;
case NAMED_VALUE:
return specific >= KEYWORD_TRUE && specific <= KEYWORD_NULL;
case TRUTH_VALUE:
return specific == KEYWORD_TRUE || specific == KEYWORD_FALSE;
case TYPE_NAME:
case CREATABLE_TYPE_NAME:
if (specific == IDENTIFIER) {
return true;
}
/* FALL THROUGH */
case PRIMITIVE_TYPE:
return specific >= KEYWORD_VOID && specific <= KEYWORD_CHAR;
/* FALL THROUGH */
case CREATABLE_PRIMITIVE_TYPE:
return specific >= KEYWORD_BOOLEAN && specific <= KEYWORD_CHAR;
case LOOP:
switch (specific) {
case KEYWORD_DO:
case KEYWORD_WHILE:
case KEYWORD_FOR:
return true;
}
break;
case RESERVED_KEYWORD:
return specific >= KEYWORD_CONST && specific <= KEYWORD_GOTO;
case KEYWORD_IDENTIFIER:
switch (specific) {
case KEYWORD_CLASS:
case KEYWORD_INTERFACE:
case KEYWORD_MIXIN:
case KEYWORD_DEF:
case KEYWORD_DEFMACRO:
case KEYWORD_IN:
case KEYWORD_PROPERTY:
return true;
}
break;
case SYNTHETIC:
return specific >= SYNTH_COMPILATION_UNIT && specific <= SYNTH_VARIABLE_DECLARATION;
case TYPE_DECLARATION:
return specific >= KEYWORD_CLASS && specific <= KEYWORD_MIXIN;
case DECLARATION_MODIFIER:
return specific >= KEYWORD_PRIVATE && specific <= KEYWORD_STATIC;
case MATCHED_CONTAINER:
switch (specific) {
case LEFT_CURLY_BRACE:
case RIGHT_CURLY_BRACE:
case LEFT_SQUARE_BRACKET:
case RIGHT_SQUARE_BRACKET:
case LEFT_PARENTHESIS:
case RIGHT_PARENTHESIS:
return true;
}
break;
case LEFT_OF_MATCHED_CONTAINER:
switch (specific) {
case LEFT_CURLY_BRACE:
case LEFT_SQUARE_BRACKET:
case LEFT_PARENTHESIS:
return true;
}
break;
case RIGHT_OF_MATCHED_CONTAINER:
switch (specific) {
case RIGHT_CURLY_BRACE:
case RIGHT_SQUARE_BRACKET:
case RIGHT_PARENTHESIS:
return true;
}
break;
case PARAMETER_TERMINATORS:
return specific == RIGHT_PARENTHESIS || specific == COMMA;
case ARRAY_ITEM_TERMINATORS:
return specific == RIGHT_SQUARE_BRACKET || specific == COMMA;
case TYPE_LIST_TERMINATORS:
switch (specific) {
case KEYWORD_IMPLEMENTS:
case KEYWORD_THROWS:
case LEFT_CURLY_BRACE:
case COMMA:
return true;
}
break;
case OPTIONAL_DATATYPE_FOLLOWERS:
switch (specific) {
case IDENTIFIER:
case LEFT_SQUARE_BRACKET:
case DOT:
return true;
}
break;
case SWITCH_BLOCK_TERMINATORS:
if (specific == RIGHT_CURLY_BRACE) {
return true;
}
/* FALL THROUGH */
case SWITCH_ENTRIES:
return specific == KEYWORD_CASE || specific == KEYWORD_DEFAULT;
case METHOD_CALL_STARTERS:
if (specific >= STRING && specific <= DECIMAL_NUMBER) {
return true;
}
switch (specific) {
case LEFT_PARENTHESIS:
case GSTRING_START:
case SYNTH_GSTRING:
case KEYWORD_NEW:
return true;
}
break;
case UNSAFE_OVER_NEWLINES:
if (ofType(specific, SYMBOL)) {
switch (specific) {
case LEFT_CURLY_BRACE:
case LEFT_PARENTHESIS:
case LEFT_SQUARE_BRACKET:
case PLUS:
case PLUS_PLUS:
case MINUS:
case MINUS_MINUS:
case REGEX_PATTERN:
case NOT:
return true;
}
return false;
}
switch (specific) {
case KEYWORD_INSTANCEOF:
case GSTRING_EXPRESSION_START:
case GSTRING_EXPRESSION_END:
case GSTRING_END:
return false;
}
return true;
case PRECLUDES_CAST_OPERATOR:
switch (specific) {
case PLUS:
case MINUS:
case PREFIX_MINUS:
case PREFIX_MINUS_MINUS:
case PREFIX_PLUS:
case PREFIX_PLUS_PLUS:
case LEFT_PARENTHESIS:
return false;
}
return !ofType(specific, COMPLEX_EXPRESSION);
case OPERATOR_EXPRESSION:
return specific >= DOT && specific <= RIGHT_SHIFT_UNSIGNED;
case SYNTH_EXPRESSION:
switch (specific) {
case SYNTH_CAST:
case SYNTH_CLOSURE:
case SYNTH_TERNARY:
return true;
}
break;
case KEYWORD_EXPRESSION:
switch (specific) {
case KEYWORD_NEW:
case KEYWORD_THIS:
case KEYWORD_SUPER:
case KEYWORD_INSTANCEOF:
case KEYWORD_TRUE:
case KEYWORD_FALSE:
case KEYWORD_NULL:
return true;
}
break;
case ARRAY_EXPRESSION:
return specific == LEFT_SQUARE_BRACKET;
case EXPRESSION:
if (specific >= DOT && specific <= RIGHT_SHIFT_UNSIGNED) {
return true;
}
if (specific >= STRING && specific <= DECIMAL_NUMBER) {
return true;
}
switch (specific) {
case SYNTH_CAST:
case SYNTH_CLOSURE:
case SYNTH_TERNARY:
case SYNTH_GSTRING:
case KEYWORD_NEW:
case KEYWORD_THIS:
case KEYWORD_SUPER:
case KEYWORD_INSTANCEOF:
case KEYWORD_TRUE:
case KEYWORD_FALSE:
case KEYWORD_NULL:
case LEFT_SQUARE_BRACKET:
return true;
}
break;
case COMPLEX_EXPRESSION:
switch (specific) {
case KEYWORD_NEW:
case SYNTH_METHOD_CALL:
case SYNTH_GSTRING:
case SYNTH_LIST:
case SYNTH_MAP:
case SYNTH_CLOSURE:
case SYNTH_TERNARY:
case SYNTH_VARIABLE_DECLARATION:
return true;
}
/* FALL THROUGH */
case SIMPLE_EXPRESSION:
if (specific >= STRING && specific <= DECIMAL_NUMBER) {
return true;
}
switch (specific) {
case KEYWORD_SUPER:
case KEYWORD_THIS:
case KEYWORD_TRUE:
case KEYWORD_FALSE:
case KEYWORD_NULL:
return true;
}
break;
}
return false;
} | class class_name[name] begin[{]
method[ofType, return_type[type[boolean]], modifier[public static], parameter[specific, general]] begin[{]
if[binary_operation[member[.general], ==, member[.specific]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
SwitchStatement(cases=[SwitchStatementCase(case=['ANY'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]), SwitchStatementCase(case=['NOT_EOF'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=UNKNOWN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SYNTH_VARIABLE_DECLARATION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), label=None)]), SwitchStatementCase(case=['GENERAL_END_OF_STATEMENT'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['EOF', 'NEWLINE', 'SEMICOLON'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['ANY_END_OF_STATEMENT'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['EOF', 'NEWLINE', 'SEMICOLON', 'RIGHT_CURLY_BRACE'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['ASSIGNMENT_OPERATOR'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=PLUS_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ELVIS_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LOGICAL_OR_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LOGICAL_AND_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LEFT_SHIFT_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RIGHT_SHIFT_UNSIGNED_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BITWISE_OR_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BITWISE_XOR_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), label=None)]), SwitchStatementCase(case=['COMPARISON_OPERATOR'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COMPARE_NOT_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COMPARE_TO, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), label=None)]), SwitchStatementCase(case=['MATH_OPERATOR'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=PLUS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RIGHT_SHIFT_UNSIGNED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=NOT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LOGICAL_AND, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BITWISE_OR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BITWISE_XOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), label=None)]), SwitchStatementCase(case=['LOGICAL_OPERATOR'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=NOT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LOGICAL_AND, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), label=None)]), SwitchStatementCase(case=['BITWISE_OPERATOR'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BITWISE_OR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BITWISE_XOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BITWISE_NEGATION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), label=None)]), SwitchStatementCase(case=['RANGE_OPERATOR'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DOT_DOT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DOT_DOT_DOT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), label=None)]), SwitchStatementCase(case=['REGEX_COMPARISON_OPERATOR'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=FIND_REGEX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MATCH_REGEX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), label=None)]), SwitchStatementCase(case=['DEREFERENCE_OPERATOR'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DOT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=NAVIGATE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), label=None)]), SwitchStatementCase(case=['PREFIX_OPERATOR'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['MINUS', 'PLUS_PLUS', 'MINUS_MINUS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), SwitchStatementCase(case=['PURE_PREFIX_OPERATOR'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['REGEX_PATTERN', 'NOT', 'PREFIX_PLUS', 'PREFIX_PLUS_PLUS', 'PREFIX_MINUS', 'PREFIX_MINUS_MINUS', 'SYNTH_CAST'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['POSTFIX_OPERATOR'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['PLUS_PLUS', 'POSTFIX_PLUS_PLUS', 'MINUS_MINUS', 'POSTFIX_MINUS_MINUS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['INFIX_OPERATOR'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['DOT', 'NAVIGATE', 'LOGICAL_OR', 'LOGICAL_AND', 'BITWISE_OR', 'BITWISE_AND', 'BITWISE_XOR', 'LEFT_SHIFT', 'RIGHT_SHIFT', 'RIGHT_SHIFT_UNSIGNED', 'FIND_REGEX', 'MATCH_REGEX', 'DOT_DOT', 'DOT_DOT_DOT', 'KEYWORD_INSTANCEOF'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COMPARE_NOT_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COMPARE_TO, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=PLUS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MOD_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=PLUS_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ELVIS_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LOGICAL_OR_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LOGICAL_AND_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LEFT_SHIFT_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RIGHT_SHIFT_UNSIGNED_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BITWISE_OR_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BITWISE_XOR_EQUAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), label=None)]), SwitchStatementCase(case=['PREFIX_OR_INFIX_OPERATOR'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['POWER', 'PLUS', 'MINUS', 'PREFIX_PLUS', 'PREFIX_MINUS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['KEYWORD'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_PRIVATE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_GOTO, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), label=None)]), SwitchStatementCase(case=['SYMBOL'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=NEWLINE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=PIPE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), label=None)]), SwitchStatementCase(case=['LITERAL', 'LITERAL_EXPRESSION'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=STRING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DECIMAL_NUMBER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), label=None)]), SwitchStatementCase(case=['NUMBER'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=INTEGER_NUMBER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DECIMAL_NUMBER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), label=None)]), SwitchStatementCase(case=['SIGN'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['PLUS', 'MINUS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['NAMED_VALUE'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_TRUE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_NULL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), label=None)]), SwitchStatementCase(case=['TRUTH_VALUE'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_TRUE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_FALSE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), label=None)]), SwitchStatementCase(case=['TYPE_NAME', 'CREATABLE_TYPE_NAME'], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=IDENTIFIER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), SwitchStatementCase(case=['PRIMITIVE_TYPE'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_VOID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_CHAR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), label=None)]), SwitchStatementCase(case=['CREATABLE_PRIMITIVE_TYPE'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_BOOLEAN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_CHAR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), label=None)]), SwitchStatementCase(case=['LOOP'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['KEYWORD_DO', 'KEYWORD_WHILE', 'KEYWORD_FOR'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RESERVED_KEYWORD'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_CONST, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_GOTO, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), label=None)]), SwitchStatementCase(case=['KEYWORD_IDENTIFIER'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['KEYWORD_CLASS', 'KEYWORD_INTERFACE', 'KEYWORD_MIXIN', 'KEYWORD_DEF', 'KEYWORD_DEFMACRO', 'KEYWORD_IN', 'KEYWORD_PROPERTY'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['SYNTHETIC'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SYNTH_COMPILATION_UNIT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SYNTH_VARIABLE_DECLARATION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), label=None)]), SwitchStatementCase(case=['TYPE_DECLARATION'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_CLASS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_MIXIN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), label=None)]), SwitchStatementCase(case=['DECLARATION_MODIFIER'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_PRIVATE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_STATIC, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), label=None)]), SwitchStatementCase(case=['MATCHED_CONTAINER'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['LEFT_CURLY_BRACE', 'RIGHT_CURLY_BRACE', 'LEFT_SQUARE_BRACKET', 'RIGHT_SQUARE_BRACKET', 'LEFT_PARENTHESIS', 'RIGHT_PARENTHESIS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['LEFT_OF_MATCHED_CONTAINER'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['LEFT_CURLY_BRACE', 'LEFT_SQUARE_BRACKET', 'LEFT_PARENTHESIS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RIGHT_OF_MATCHED_CONTAINER'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['RIGHT_CURLY_BRACE', 'RIGHT_SQUARE_BRACKET', 'RIGHT_PARENTHESIS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['PARAMETER_TERMINATORS'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RIGHT_PARENTHESIS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COMMA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), label=None)]), SwitchStatementCase(case=['ARRAY_ITEM_TERMINATORS'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RIGHT_SQUARE_BRACKET, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COMMA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), label=None)]), SwitchStatementCase(case=['TYPE_LIST_TERMINATORS'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['KEYWORD_IMPLEMENTS', 'KEYWORD_THROWS', 'LEFT_CURLY_BRACE', 'COMMA'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['OPTIONAL_DATATYPE_FOLLOWERS'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['IDENTIFIER', 'LEFT_SQUARE_BRACKET', 'DOT'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['SWITCH_BLOCK_TERMINATORS'], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RIGHT_CURLY_BRACE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), SwitchStatementCase(case=['SWITCH_ENTRIES'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_CASE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYWORD_DEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), label=None)]), SwitchStatementCase(case=['METHOD_CALL_STARTERS'], statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=STRING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DECIMAL_NUMBER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=['LEFT_PARENTHESIS', 'GSTRING_START', 'SYNTH_GSTRING', 'KEYWORD_NEW'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['UNSAFE_OVER_NEWLINES'], statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SYMBOL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ofType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[SwitchStatement(cases=[SwitchStatementCase(case=['LEFT_CURLY_BRACE', 'LEFT_PARENTHESIS', 'LEFT_SQUARE_BRACKET', 'PLUS', 'PLUS_PLUS', 'MINUS', 'MINUS_MINUS', 'REGEX_PATTERN', 'NOT'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=['KEYWORD_INSTANCEOF', 'GSTRING_EXPRESSION_START', 'GSTRING_EXPRESSION_END', 'GSTRING_END'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]), SwitchStatementCase(case=['PRECLUDES_CAST_OPERATOR'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['PLUS', 'MINUS', 'PREFIX_MINUS', 'PREFIX_MINUS_MINUS', 'PREFIX_PLUS', 'PREFIX_PLUS_PLUS', 'LEFT_PARENTHESIS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=COMPLEX_EXPRESSION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ofType, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['OPERATOR_EXPRESSION'], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DOT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RIGHT_SHIFT_UNSIGNED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), label=None)]), SwitchStatementCase(case=['SYNTH_EXPRESSION'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['SYNTH_CAST', 'SYNTH_CLOSURE', 'SYNTH_TERNARY'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['KEYWORD_EXPRESSION'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['KEYWORD_NEW', 'KEYWORD_THIS', 'KEYWORD_SUPER', 'KEYWORD_INSTANCEOF', 'KEYWORD_TRUE', 'KEYWORD_FALSE', 'KEYWORD_NULL'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['ARRAY_EXPRESSION'], statements=[ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LEFT_SQUARE_BRACKET, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), label=None)]), SwitchStatementCase(case=['EXPRESSION'], statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DOT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RIGHT_SHIFT_UNSIGNED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=STRING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DECIMAL_NUMBER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=['SYNTH_CAST', 'SYNTH_CLOSURE', 'SYNTH_TERNARY', 'SYNTH_GSTRING', 'KEYWORD_NEW', 'KEYWORD_THIS', 'KEYWORD_SUPER', 'KEYWORD_INSTANCEOF', 'KEYWORD_TRUE', 'KEYWORD_FALSE', 'KEYWORD_NULL', 'LEFT_SQUARE_BRACKET'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['COMPLEX_EXPRESSION'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['KEYWORD_NEW', 'SYNTH_METHOD_CALL', 'SYNTH_GSTRING', 'SYNTH_LIST', 'SYNTH_MAP', 'SYNTH_CLOSURE', 'SYNTH_TERNARY', 'SYNTH_VARIABLE_DECLARATION'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), SwitchStatementCase(case=['SIMPLE_EXPRESSION'], statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=STRING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DECIMAL_NUMBER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=['KEYWORD_SUPER', 'KEYWORD_THIS', 'KEYWORD_TRUE', 'KEYWORD_FALSE', 'KEYWORD_NULL'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MemberReference(member=specific, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=general, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)
return[literal[false]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[boolean] identifier[ofType] operator[SEP] Keyword[int] identifier[specific] , Keyword[int] identifier[general] operator[SEP] {
Keyword[if] operator[SEP] identifier[general] operator[==] identifier[specific] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[switch] operator[SEP] identifier[general] operator[SEP] {
Keyword[case] identifier[ANY] operator[:] Keyword[return] literal[boolean] operator[SEP] Keyword[case] identifier[NOT_EOF] operator[:] Keyword[return] identifier[specific] operator[>=] identifier[UNKNOWN] operator[&&] identifier[specific] operator[<=] identifier[SYNTH_VARIABLE_DECLARATION] operator[SEP] Keyword[case] identifier[GENERAL_END_OF_STATEMENT] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[EOF] operator[:] Keyword[case] identifier[NEWLINE] operator[:] Keyword[case] identifier[SEMICOLON] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[ANY_END_OF_STATEMENT] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[EOF] operator[:] Keyword[case] identifier[NEWLINE] operator[:] Keyword[case] identifier[SEMICOLON] operator[:] Keyword[case] identifier[RIGHT_CURLY_BRACE] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[ASSIGNMENT_OPERATOR] operator[:] Keyword[return] identifier[specific] operator[==] identifier[EQUAL] operator[||] operator[SEP] identifier[specific] operator[>=] identifier[PLUS_EQUAL] operator[&&] identifier[specific] operator[<=] identifier[ELVIS_EQUAL] operator[SEP] operator[||] operator[SEP] identifier[specific] operator[>=] identifier[LOGICAL_OR_EQUAL] operator[&&] identifier[specific] operator[<=] identifier[LOGICAL_AND_EQUAL] operator[SEP] operator[||] operator[SEP] identifier[specific] operator[>=] identifier[LEFT_SHIFT_EQUAL] operator[&&] identifier[specific] operator[<=] identifier[RIGHT_SHIFT_UNSIGNED_EQUAL] operator[SEP] operator[||] operator[SEP] identifier[specific] operator[>=] identifier[BITWISE_OR_EQUAL] operator[&&] identifier[specific] operator[<=] identifier[BITWISE_XOR_EQUAL] operator[SEP] operator[SEP] Keyword[case] identifier[COMPARISON_OPERATOR] operator[:] Keyword[return] identifier[specific] operator[>=] identifier[COMPARE_NOT_EQUAL] operator[&&] identifier[specific] operator[<=] identifier[COMPARE_TO] operator[SEP] Keyword[case] identifier[MATH_OPERATOR] operator[:] Keyword[return] operator[SEP] identifier[specific] operator[>=] identifier[PLUS] operator[&&] identifier[specific] operator[<=] identifier[RIGHT_SHIFT_UNSIGNED] operator[SEP] operator[||] operator[SEP] identifier[specific] operator[>=] identifier[NOT] operator[&&] identifier[specific] operator[<=] identifier[LOGICAL_AND] operator[SEP] operator[||] operator[SEP] identifier[specific] operator[>=] identifier[BITWISE_OR] operator[&&] identifier[specific] operator[<=] identifier[BITWISE_XOR] operator[SEP] operator[SEP] Keyword[case] identifier[LOGICAL_OPERATOR] operator[:] Keyword[return] identifier[specific] operator[>=] identifier[NOT] operator[&&] identifier[specific] operator[<=] identifier[LOGICAL_AND] operator[SEP] Keyword[case] identifier[BITWISE_OPERATOR] operator[:] Keyword[return] operator[SEP] identifier[specific] operator[>=] identifier[BITWISE_OR] operator[&&] identifier[specific] operator[<=] identifier[BITWISE_XOR] operator[SEP] operator[||] identifier[specific] operator[==] identifier[BITWISE_NEGATION] operator[SEP] Keyword[case] identifier[RANGE_OPERATOR] operator[:] Keyword[return] identifier[specific] operator[==] identifier[DOT_DOT] operator[||] identifier[specific] operator[==] identifier[DOT_DOT_DOT] operator[SEP] Keyword[case] identifier[REGEX_COMPARISON_OPERATOR] operator[:] Keyword[return] identifier[specific] operator[==] identifier[FIND_REGEX] operator[||] identifier[specific] operator[==] identifier[MATCH_REGEX] operator[SEP] Keyword[case] identifier[DEREFERENCE_OPERATOR] operator[:] Keyword[return] identifier[specific] operator[==] identifier[DOT] operator[||] identifier[specific] operator[==] identifier[NAVIGATE] operator[SEP] Keyword[case] identifier[PREFIX_OPERATOR] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[MINUS] operator[:] Keyword[case] identifier[PLUS_PLUS] operator[:] Keyword[case] identifier[MINUS_MINUS] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[case] identifier[PURE_PREFIX_OPERATOR] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[REGEX_PATTERN] operator[:] Keyword[case] identifier[NOT] operator[:] Keyword[case] identifier[PREFIX_PLUS] operator[:] Keyword[case] identifier[PREFIX_PLUS_PLUS] operator[:] Keyword[case] identifier[PREFIX_MINUS] operator[:] Keyword[case] identifier[PREFIX_MINUS_MINUS] operator[:] Keyword[case] identifier[SYNTH_CAST] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[POSTFIX_OPERATOR] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[PLUS_PLUS] operator[:] Keyword[case] identifier[POSTFIX_PLUS_PLUS] operator[:] Keyword[case] identifier[MINUS_MINUS] operator[:] Keyword[case] identifier[POSTFIX_MINUS_MINUS] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[INFIX_OPERATOR] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[DOT] operator[:] Keyword[case] identifier[NAVIGATE] operator[:] Keyword[case] identifier[LOGICAL_OR] operator[:] Keyword[case] identifier[LOGICAL_AND] operator[:] Keyword[case] identifier[BITWISE_OR] operator[:] Keyword[case] identifier[BITWISE_AND] operator[:] Keyword[case] identifier[BITWISE_XOR] operator[:] Keyword[case] identifier[LEFT_SHIFT] operator[:] Keyword[case] identifier[RIGHT_SHIFT] operator[:] Keyword[case] identifier[RIGHT_SHIFT_UNSIGNED] operator[:] Keyword[case] identifier[FIND_REGEX] operator[:] Keyword[case] identifier[MATCH_REGEX] operator[:] Keyword[case] identifier[DOT_DOT] operator[:] Keyword[case] identifier[DOT_DOT_DOT] operator[:] Keyword[case] identifier[KEYWORD_INSTANCEOF] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[return] operator[SEP] identifier[specific] operator[>=] identifier[COMPARE_NOT_EQUAL] operator[&&] identifier[specific] operator[<=] identifier[COMPARE_TO] operator[SEP] operator[||] operator[SEP] identifier[specific] operator[>=] identifier[PLUS] operator[&&] identifier[specific] operator[<=] identifier[MOD_EQUAL] operator[SEP] operator[||] identifier[specific] operator[==] identifier[EQUAL] operator[||] operator[SEP] identifier[specific] operator[>=] identifier[PLUS_EQUAL] operator[&&] identifier[specific] operator[<=] identifier[ELVIS_EQUAL] operator[SEP] operator[||] operator[SEP] identifier[specific] operator[>=] identifier[LOGICAL_OR_EQUAL] operator[&&] identifier[specific] operator[<=] identifier[LOGICAL_AND_EQUAL] operator[SEP] operator[||] operator[SEP] identifier[specific] operator[>=] identifier[LEFT_SHIFT_EQUAL] operator[&&] identifier[specific] operator[<=] identifier[RIGHT_SHIFT_UNSIGNED_EQUAL] operator[SEP] operator[||] operator[SEP] identifier[specific] operator[>=] identifier[BITWISE_OR_EQUAL] operator[&&] identifier[specific] operator[<=] identifier[BITWISE_XOR_EQUAL] operator[SEP] operator[SEP] Keyword[case] identifier[PREFIX_OR_INFIX_OPERATOR] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[POWER] operator[:] Keyword[case] identifier[PLUS] operator[:] Keyword[case] identifier[MINUS] operator[:] Keyword[case] identifier[PREFIX_PLUS] operator[:] Keyword[case] identifier[PREFIX_MINUS] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[KEYWORD] operator[:] Keyword[return] identifier[specific] operator[>=] identifier[KEYWORD_PRIVATE] operator[&&] identifier[specific] operator[<=] identifier[KEYWORD_GOTO] operator[SEP] Keyword[case] identifier[SYMBOL] operator[:] Keyword[return] identifier[specific] operator[>=] identifier[NEWLINE] operator[&&] identifier[specific] operator[<=] identifier[PIPE] operator[SEP] Keyword[case] identifier[LITERAL] operator[:] Keyword[case] identifier[LITERAL_EXPRESSION] operator[:] Keyword[return] identifier[specific] operator[>=] identifier[STRING] operator[&&] identifier[specific] operator[<=] identifier[DECIMAL_NUMBER] operator[SEP] Keyword[case] identifier[NUMBER] operator[:] Keyword[return] identifier[specific] operator[==] identifier[INTEGER_NUMBER] operator[||] identifier[specific] operator[==] identifier[DECIMAL_NUMBER] operator[SEP] Keyword[case] identifier[SIGN] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[PLUS] operator[:] Keyword[case] identifier[MINUS] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[NAMED_VALUE] operator[:] Keyword[return] identifier[specific] operator[>=] identifier[KEYWORD_TRUE] operator[&&] identifier[specific] operator[<=] identifier[KEYWORD_NULL] operator[SEP] Keyword[case] identifier[TRUTH_VALUE] operator[:] Keyword[return] identifier[specific] operator[==] identifier[KEYWORD_TRUE] operator[||] identifier[specific] operator[==] identifier[KEYWORD_FALSE] operator[SEP] Keyword[case] identifier[TYPE_NAME] operator[:] Keyword[case] identifier[CREATABLE_TYPE_NAME] operator[:] Keyword[if] operator[SEP] identifier[specific] operator[==] identifier[IDENTIFIER] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[case] identifier[PRIMITIVE_TYPE] operator[:] Keyword[return] identifier[specific] operator[>=] identifier[KEYWORD_VOID] operator[&&] identifier[specific] operator[<=] identifier[KEYWORD_CHAR] operator[SEP] Keyword[case] identifier[CREATABLE_PRIMITIVE_TYPE] operator[:] Keyword[return] identifier[specific] operator[>=] identifier[KEYWORD_BOOLEAN] operator[&&] identifier[specific] operator[<=] identifier[KEYWORD_CHAR] operator[SEP] Keyword[case] identifier[LOOP] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[KEYWORD_DO] operator[:] Keyword[case] identifier[KEYWORD_WHILE] operator[:] Keyword[case] identifier[KEYWORD_FOR] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[RESERVED_KEYWORD] operator[:] Keyword[return] identifier[specific] operator[>=] identifier[KEYWORD_CONST] operator[&&] identifier[specific] operator[<=] identifier[KEYWORD_GOTO] operator[SEP] Keyword[case] identifier[KEYWORD_IDENTIFIER] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[KEYWORD_CLASS] operator[:] Keyword[case] identifier[KEYWORD_INTERFACE] operator[:] Keyword[case] identifier[KEYWORD_MIXIN] operator[:] Keyword[case] identifier[KEYWORD_DEF] operator[:] Keyword[case] identifier[KEYWORD_DEFMACRO] operator[:] Keyword[case] identifier[KEYWORD_IN] operator[:] Keyword[case] identifier[KEYWORD_PROPERTY] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[SYNTHETIC] operator[:] Keyword[return] identifier[specific] operator[>=] identifier[SYNTH_COMPILATION_UNIT] operator[&&] identifier[specific] operator[<=] identifier[SYNTH_VARIABLE_DECLARATION] operator[SEP] Keyword[case] identifier[TYPE_DECLARATION] operator[:] Keyword[return] identifier[specific] operator[>=] identifier[KEYWORD_CLASS] operator[&&] identifier[specific] operator[<=] identifier[KEYWORD_MIXIN] operator[SEP] Keyword[case] identifier[DECLARATION_MODIFIER] operator[:] Keyword[return] identifier[specific] operator[>=] identifier[KEYWORD_PRIVATE] operator[&&] identifier[specific] operator[<=] identifier[KEYWORD_STATIC] operator[SEP] Keyword[case] identifier[MATCHED_CONTAINER] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[LEFT_CURLY_BRACE] operator[:] Keyword[case] identifier[RIGHT_CURLY_BRACE] operator[:] Keyword[case] identifier[LEFT_SQUARE_BRACKET] operator[:] Keyword[case] identifier[RIGHT_SQUARE_BRACKET] operator[:] Keyword[case] identifier[LEFT_PARENTHESIS] operator[:] Keyword[case] identifier[RIGHT_PARENTHESIS] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[LEFT_OF_MATCHED_CONTAINER] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[LEFT_CURLY_BRACE] operator[:] Keyword[case] identifier[LEFT_SQUARE_BRACKET] operator[:] Keyword[case] identifier[LEFT_PARENTHESIS] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[RIGHT_OF_MATCHED_CONTAINER] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[RIGHT_CURLY_BRACE] operator[:] Keyword[case] identifier[RIGHT_SQUARE_BRACKET] operator[:] Keyword[case] identifier[RIGHT_PARENTHESIS] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[PARAMETER_TERMINATORS] operator[:] Keyword[return] identifier[specific] operator[==] identifier[RIGHT_PARENTHESIS] operator[||] identifier[specific] operator[==] identifier[COMMA] operator[SEP] Keyword[case] identifier[ARRAY_ITEM_TERMINATORS] operator[:] Keyword[return] identifier[specific] operator[==] identifier[RIGHT_SQUARE_BRACKET] operator[||] identifier[specific] operator[==] identifier[COMMA] operator[SEP] Keyword[case] identifier[TYPE_LIST_TERMINATORS] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[KEYWORD_IMPLEMENTS] operator[:] Keyword[case] identifier[KEYWORD_THROWS] operator[:] Keyword[case] identifier[LEFT_CURLY_BRACE] operator[:] Keyword[case] identifier[COMMA] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[OPTIONAL_DATATYPE_FOLLOWERS] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[IDENTIFIER] operator[:] Keyword[case] identifier[LEFT_SQUARE_BRACKET] operator[:] Keyword[case] identifier[DOT] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[SWITCH_BLOCK_TERMINATORS] operator[:] Keyword[if] operator[SEP] identifier[specific] operator[==] identifier[RIGHT_CURLY_BRACE] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[case] identifier[SWITCH_ENTRIES] operator[:] Keyword[return] identifier[specific] operator[==] identifier[KEYWORD_CASE] operator[||] identifier[specific] operator[==] identifier[KEYWORD_DEFAULT] operator[SEP] Keyword[case] identifier[METHOD_CALL_STARTERS] operator[:] Keyword[if] operator[SEP] identifier[specific] operator[>=] identifier[STRING] operator[&&] identifier[specific] operator[<=] identifier[DECIMAL_NUMBER] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[LEFT_PARENTHESIS] operator[:] Keyword[case] identifier[GSTRING_START] operator[:] Keyword[case] identifier[SYNTH_GSTRING] operator[:] Keyword[case] identifier[KEYWORD_NEW] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[UNSAFE_OVER_NEWLINES] operator[:] Keyword[if] operator[SEP] identifier[ofType] operator[SEP] identifier[specific] , identifier[SYMBOL] operator[SEP] operator[SEP] {
Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[LEFT_CURLY_BRACE] operator[:] Keyword[case] identifier[LEFT_PARENTHESIS] operator[:] Keyword[case] identifier[LEFT_SQUARE_BRACKET] operator[:] Keyword[case] identifier[PLUS] operator[:] Keyword[case] identifier[PLUS_PLUS] operator[:] Keyword[case] identifier[MINUS] operator[:] Keyword[case] identifier[MINUS_MINUS] operator[:] Keyword[case] identifier[REGEX_PATTERN] operator[:] Keyword[case] identifier[NOT] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[KEYWORD_INSTANCEOF] operator[:] Keyword[case] identifier[GSTRING_EXPRESSION_START] operator[:] Keyword[case] identifier[GSTRING_EXPRESSION_END] operator[:] Keyword[case] identifier[GSTRING_END] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[return] literal[boolean] operator[SEP] Keyword[case] identifier[PRECLUDES_CAST_OPERATOR] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[PLUS] operator[:] Keyword[case] identifier[MINUS] operator[:] Keyword[case] identifier[PREFIX_MINUS] operator[:] Keyword[case] identifier[PREFIX_MINUS_MINUS] operator[:] Keyword[case] identifier[PREFIX_PLUS] operator[:] Keyword[case] identifier[PREFIX_PLUS_PLUS] operator[:] Keyword[case] identifier[LEFT_PARENTHESIS] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[return] operator[!] identifier[ofType] operator[SEP] identifier[specific] , identifier[COMPLEX_EXPRESSION] operator[SEP] operator[SEP] Keyword[case] identifier[OPERATOR_EXPRESSION] operator[:] Keyword[return] identifier[specific] operator[>=] identifier[DOT] operator[&&] identifier[specific] operator[<=] identifier[RIGHT_SHIFT_UNSIGNED] operator[SEP] Keyword[case] identifier[SYNTH_EXPRESSION] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[SYNTH_CAST] operator[:] Keyword[case] identifier[SYNTH_CLOSURE] operator[:] Keyword[case] identifier[SYNTH_TERNARY] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[KEYWORD_EXPRESSION] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[KEYWORD_NEW] operator[:] Keyword[case] identifier[KEYWORD_THIS] operator[:] Keyword[case] identifier[KEYWORD_SUPER] operator[:] Keyword[case] identifier[KEYWORD_INSTANCEOF] operator[:] Keyword[case] identifier[KEYWORD_TRUE] operator[:] Keyword[case] identifier[KEYWORD_FALSE] operator[:] Keyword[case] identifier[KEYWORD_NULL] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[ARRAY_EXPRESSION] operator[:] Keyword[return] identifier[specific] operator[==] identifier[LEFT_SQUARE_BRACKET] operator[SEP] Keyword[case] identifier[EXPRESSION] operator[:] Keyword[if] operator[SEP] identifier[specific] operator[>=] identifier[DOT] operator[&&] identifier[specific] operator[<=] identifier[RIGHT_SHIFT_UNSIGNED] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[if] operator[SEP] identifier[specific] operator[>=] identifier[STRING] operator[&&] identifier[specific] operator[<=] identifier[DECIMAL_NUMBER] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[SYNTH_CAST] operator[:] Keyword[case] identifier[SYNTH_CLOSURE] operator[:] Keyword[case] identifier[SYNTH_TERNARY] operator[:] Keyword[case] identifier[SYNTH_GSTRING] operator[:] Keyword[case] identifier[KEYWORD_NEW] operator[:] Keyword[case] identifier[KEYWORD_THIS] operator[:] Keyword[case] identifier[KEYWORD_SUPER] operator[:] Keyword[case] identifier[KEYWORD_INSTANCEOF] operator[:] Keyword[case] identifier[KEYWORD_TRUE] operator[:] Keyword[case] identifier[KEYWORD_FALSE] operator[:] Keyword[case] identifier[KEYWORD_NULL] operator[:] Keyword[case] identifier[LEFT_SQUARE_BRACKET] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP] Keyword[case] identifier[COMPLEX_EXPRESSION] operator[:] Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[KEYWORD_NEW] operator[:] Keyword[case] identifier[SYNTH_METHOD_CALL] operator[:] Keyword[case] identifier[SYNTH_GSTRING] operator[:] Keyword[case] identifier[SYNTH_LIST] operator[:] Keyword[case] identifier[SYNTH_MAP] operator[:] Keyword[case] identifier[SYNTH_CLOSURE] operator[:] Keyword[case] identifier[SYNTH_TERNARY] operator[:] Keyword[case] identifier[SYNTH_VARIABLE_DECLARATION] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[case] identifier[SIMPLE_EXPRESSION] operator[:] Keyword[if] operator[SEP] identifier[specific] operator[>=] identifier[STRING] operator[&&] identifier[specific] operator[<=] identifier[DECIMAL_NUMBER] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[switch] operator[SEP] identifier[specific] operator[SEP] {
Keyword[case] identifier[KEYWORD_SUPER] operator[:] Keyword[case] identifier[KEYWORD_THIS] operator[:] Keyword[case] identifier[KEYWORD_TRUE] operator[:] Keyword[case] identifier[KEYWORD_FALSE] operator[:] Keyword[case] identifier[KEYWORD_NULL] operator[:] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[break] operator[SEP]
}
Keyword[return] literal[boolean] operator[SEP]
}
|
public static SocksProxyTransport connectViaSocks4Proxy(String remoteHost,
int remotePort, String proxyHost, int proxyPort, String userId)
throws IOException, UnknownHostException {
SocksProxyTransport proxySocket = new SocksProxyTransport(remoteHost,
remotePort, proxyHost, proxyPort, SOCKS4);
proxySocket.username = userId;
try {
InputStream proxyIn = proxySocket.getInputStream();
OutputStream proxyOut = proxySocket.getOutputStream();
InetAddress hostAddr = InetAddress.getByName(remoteHost);
proxyOut.write(SOCKS4);
proxyOut.write(CONNECT);
proxyOut.write((remotePort >>> 8) & 0xff);
proxyOut.write(remotePort & 0xff);
proxyOut.write(hostAddr.getAddress());
proxyOut.write(userId.getBytes());
proxyOut.write(NULL_TERMINATION);
proxyOut.flush();
int res = proxyIn.read();
if (res == -1) {
throw new IOException("SOCKS4 server " + proxyHost + ":"
+ proxyPort + " disconnected");
}
if (res != 0x00) {
throw new IOException("Invalid response from SOCKS4 server ("
+ res + ") " + proxyHost + ":" + proxyPort);
}
int code = proxyIn.read();
if (code != 90) {
if ((code > 90) && (code < 93)) {
throw new IOException(
"SOCKS4 server unable to connect, reason: "
+ SOCKSV4_ERROR[code - 91]);
}
throw new IOException(
"SOCKS4 server unable to connect, reason: " + code);
}
byte[] data = new byte[6];
if (proxyIn.read(data, 0, 6) != 6) {
throw new IOException(
"SOCKS4 error reading destination address/port");
}
proxySocket.setProviderDetail(data[2] + "." + data[3] + "."
+ data[4] + "." + data[5] + ":"
+ ((data[0] << 8) | data[1]));
} catch (SocketException e) {
throw new SocketException("Error communicating with SOCKS4 server "
+ proxyHost + ":" + proxyPort + ", " + e.getMessage());
}
return proxySocket;
} | class class_name[name] begin[{]
method[connectViaSocks4Proxy, return_type[type[SocksProxyTransport]], modifier[public static], parameter[remoteHost, remotePort, proxyHost, proxyPort, userId]] begin[{]
local_variable[type[SocksProxyTransport], proxySocket]
assign[member[proxySocket.username], member[.userId]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=proxySocket, selectors=[], type_arguments=None), name=proxyIn)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getOutputStream, postfix_operators=[], prefix_operators=[], qualifier=proxySocket, selectors=[], type_arguments=None), name=proxyOut)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OutputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=remoteHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getByName, postfix_operators=[], prefix_operators=[], qualifier=InetAddress, selectors=[], type_arguments=None), name=hostAddr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InetAddress, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SOCKS4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=proxyOut, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=CONNECT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=proxyOut, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=remotePort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>>), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&)], member=write, postfix_operators=[], prefix_operators=[], qualifier=proxyOut, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=remotePort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&)], member=write, postfix_operators=[], prefix_operators=[], qualifier=proxyOut, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAddress, postfix_operators=[], prefix_operators=[], qualifier=hostAddr, selectors=[], type_arguments=None)], member=write, postfix_operators=[], prefix_operators=[], qualifier=proxyOut, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=userId, selectors=[], type_arguments=None)], member=write, postfix_operators=[], prefix_operators=[], qualifier=proxyOut, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=NULL_TERMINATION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=proxyOut, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=proxyOut, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=read, postfix_operators=[], prefix_operators=[], qualifier=proxyIn, selectors=[], type_arguments=None), name=res)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=res, 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=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SOCKS4 server "), operandr=MemberReference(member=proxyHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":"), operator=+), operandr=MemberReference(member=proxyPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" disconnected"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x00), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid response from SOCKS4 server ("), operandr=MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") "), operator=+), operandr=MemberReference(member=proxyHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":"), operator=+), operandr=MemberReference(member=proxyPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=read, postfix_operators=[], prefix_operators=[], qualifier=proxyIn, selectors=[], type_arguments=None), name=code)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=90), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=90), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=93), operator=<), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SOCKS4 server unable to connect, reason: "), operandr=MemberReference(member=SOCKSV4_ERROR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=91), operator=-))]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)])), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SOCKS4 server unable to connect, reason: "), operandr=MemberReference(member=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=data)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)], member=read, postfix_operators=[], prefix_operators=[], qualifier=proxyIn, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SOCKS4 error reading destination address/port")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3))]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4))]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5))]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":"), operator=+), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=<<), operandr=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operator=|), operator=+)], member=setProviderDetail, postfix_operators=[], prefix_operators=[], qualifier=proxySocket, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error communicating with SOCKS4 server "), operandr=MemberReference(member=proxyHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":"), operator=+), operandr=MemberReference(member=proxyPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SocketException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SocketException']))], finally_block=None, label=None, resources=None)
return[member[.proxySocket]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[SocksProxyTransport] identifier[connectViaSocks4Proxy] operator[SEP] identifier[String] identifier[remoteHost] , Keyword[int] identifier[remotePort] , identifier[String] identifier[proxyHost] , Keyword[int] identifier[proxyPort] , identifier[String] identifier[userId] operator[SEP] Keyword[throws] identifier[IOException] , identifier[UnknownHostException] {
identifier[SocksProxyTransport] identifier[proxySocket] operator[=] Keyword[new] identifier[SocksProxyTransport] operator[SEP] identifier[remoteHost] , identifier[remotePort] , identifier[proxyHost] , identifier[proxyPort] , identifier[SOCKS4] operator[SEP] operator[SEP] identifier[proxySocket] operator[SEP] identifier[username] operator[=] identifier[userId] operator[SEP] Keyword[try] {
identifier[InputStream] identifier[proxyIn] operator[=] identifier[proxySocket] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] identifier[OutputStream] identifier[proxyOut] operator[=] identifier[proxySocket] operator[SEP] identifier[getOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[InetAddress] identifier[hostAddr] operator[=] identifier[InetAddress] operator[SEP] identifier[getByName] operator[SEP] identifier[remoteHost] operator[SEP] operator[SEP] identifier[proxyOut] operator[SEP] identifier[write] operator[SEP] identifier[SOCKS4] operator[SEP] operator[SEP] identifier[proxyOut] operator[SEP] identifier[write] operator[SEP] identifier[CONNECT] operator[SEP] operator[SEP] identifier[proxyOut] operator[SEP] identifier[write] operator[SEP] operator[SEP] identifier[remotePort] operator[>] operator[>] operator[>] Other[8] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[proxyOut] operator[SEP] identifier[write] operator[SEP] identifier[remotePort] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[proxyOut] operator[SEP] identifier[write] operator[SEP] identifier[hostAddr] operator[SEP] identifier[getAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[proxyOut] operator[SEP] identifier[write] operator[SEP] identifier[userId] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[proxyOut] operator[SEP] identifier[write] operator[SEP] identifier[NULL_TERMINATION] operator[SEP] operator[SEP] identifier[proxyOut] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[res] operator[=] identifier[proxyIn] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[res] operator[==] operator[-] Other[1] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[proxyHost] operator[+] literal[String] operator[+] identifier[proxyPort] operator[+] literal[String] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[res] operator[!=] literal[Integer] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[res] operator[+] literal[String] operator[+] identifier[proxyHost] operator[+] literal[String] operator[+] identifier[proxyPort] operator[SEP] operator[SEP]
}
Keyword[int] identifier[code] operator[=] identifier[proxyIn] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[code] operator[!=] Other[90] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[code] operator[>] Other[90] operator[SEP] operator[&&] operator[SEP] identifier[code] operator[<] Other[93] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[SOCKSV4_ERROR] operator[SEP] identifier[code] operator[-] Other[91] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[code] operator[SEP] operator[SEP]
}
Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[6] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[proxyIn] operator[SEP] identifier[read] operator[SEP] identifier[data] , Other[0] , Other[6] operator[SEP] operator[!=] Other[6] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
identifier[proxySocket] operator[SEP] identifier[setProviderDetail] operator[SEP] identifier[data] operator[SEP] Other[2] operator[SEP] operator[+] literal[String] operator[+] identifier[data] operator[SEP] Other[3] operator[SEP] operator[+] literal[String] operator[+] identifier[data] operator[SEP] Other[4] operator[SEP] operator[+] literal[String] operator[+] identifier[data] operator[SEP] Other[5] operator[SEP] operator[+] literal[String] operator[+] operator[SEP] operator[SEP] identifier[data] operator[SEP] Other[0] operator[SEP] operator[<<] Other[8] operator[SEP] operator[|] identifier[data] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[SocketException] identifier[e] operator[SEP] {
Keyword[throw] Keyword[new] identifier[SocketException] operator[SEP] literal[String] operator[+] identifier[proxyHost] operator[+] literal[String] operator[+] identifier[proxyPort] operator[+] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] identifier[proxySocket] operator[SEP]
}
|
private boolean processElementAttributes(Element element) {
Attributes attributes = element.getAttributes();
if (attributes == null) {
return false;
}
boolean shouldPopContext = false;
registerMandatoryAttributes(attributes);
Attribute vForAttribute = attributes.get("v-for");
Attribute slotScopeAttribute = attributes.get("slot-scope");
if (vForAttribute != null || slotScopeAttribute != null) {
// Add a context layer
shouldPopContext = true;
context.addContextLayer(vForAttribute != null);
}
if (vForAttribute != null) {
String processedVForValue = processVForValue(vForAttribute.getValue());
outputDocument.replace(vForAttribute.getValueSegment(), processedVForValue);
}
if (slotScopeAttribute != null) {
String processedScopedSlotValue = processSlotScopeValue(slotScopeAttribute.getValue());
outputDocument.replace(slotScopeAttribute.getValueSegment(), processedScopedSlotValue);
}
Optional<LocalComponent> localComponent = getLocalComponentForElement(element);
Attribute refAttribute = attributes.get("ref");
if (refAttribute != null) {
result.addRef(
refAttribute.getValue(),
localComponent.map(LocalComponent::getComponentType)
.orElse(getTypeFromDOMElement(element)),
context.isInVFor()
);
}
Map<String, Class<?>> elementPropertiesType = getPropertiesForDOMElement(element)
.orElse(new HashMap<>());
// Iterate on element attributes
Set<LocalComponentProp> foundProps = new HashSet<>();
for (Attribute attribute : element.getAttributes()) {
String key = attribute.getKey();
if ("v-for".equals(key) || "slot-scope".equals(key)) {
continue;
}
if ("v-model".equals(key)) {
processVModel(attribute);
continue;
}
Optional<LocalComponentProp> optionalProp =
localComponent.flatMap(lc -> lc.getPropForAttribute(attribute.getName()));
optionalProp.ifPresent(foundProps::add);
if (!VUE_ATTR_PATTERN.matcher(key).matches()) {
optionalProp.ifPresent(this::validateStringPropBinding);
continue;
}
context.setCurrentSegment(attribute);
currentAttribute = attribute;
currentProp = optionalProp.orElse(null);
currentExpressionReturnType = getExpressionReturnTypeForAttribute(attribute,
elementPropertiesType);
String processedExpression = processExpression(attribute.getValue());
if (attribute.getValueSegment() != null) {
outputDocument.replace(attribute.getValueSegment(), processedExpression);
}
}
localComponent.ifPresent(lc -> validateRequiredProps(lc, foundProps));
return shouldPopContext;
} | class class_name[name] begin[{]
method[processElementAttributes, return_type[type[boolean]], modifier[private], parameter[element]] begin[{]
local_variable[type[Attributes], attributes]
if[binary_operation[member[.attributes], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
local_variable[type[boolean], shouldPopContext]
call[.registerMandatoryAttributes, parameter[member[.attributes]]]
local_variable[type[Attribute], vForAttribute]
local_variable[type[Attribute], slotScopeAttribute]
if[binary_operation[binary_operation[member[.vForAttribute], !=, literal[null]], ||, binary_operation[member[.slotScopeAttribute], !=, literal[null]]]] begin[{]
assign[member[.shouldPopContext], literal[true]]
call[context.addContextLayer, parameter[binary_operation[member[.vForAttribute], !=, literal[null]]]]
else begin[{]
None
end[}]
if[binary_operation[member[.vForAttribute], !=, literal[null]]] begin[{]
local_variable[type[String], processedVForValue]
call[outputDocument.replace, parameter[call[vForAttribute.getValueSegment, parameter[]], member[.processedVForValue]]]
else begin[{]
None
end[}]
if[binary_operation[member[.slotScopeAttribute], !=, literal[null]]] begin[{]
local_variable[type[String], processedScopedSlotValue]
call[outputDocument.replace, parameter[call[slotScopeAttribute.getValueSegment, parameter[]], member[.processedScopedSlotValue]]]
else begin[{]
None
end[}]
local_variable[type[Optional], localComponent]
local_variable[type[Attribute], refAttribute]
if[binary_operation[member[.refAttribute], !=, literal[null]]] begin[{]
call[result.addRef, parameter[call[refAttribute.getValue, parameter[]], call[localComponent.map, parameter[MethodReference(expression=MemberReference(member=LocalComponent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=getComponentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]], call[context.isInVFor, parameter[]]]]
else begin[{]
None
end[}]
local_variable[type[Map], elementPropertiesType]
local_variable[type[Set], foundProps]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="v-for"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="slot-scope"), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="v-model"), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processVModel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None)], member=getPropForAttribute, postfix_operators=[], prefix_operators=[], qualifier=lc, selectors=[], type_arguments=None), parameters=[MemberReference(member=lc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=flatMap, postfix_operators=[], prefix_operators=[], qualifier=localComponent, selectors=[], type_arguments=None), name=optionalProp)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=LocalComponentProp, sub_type=None))], dimensions=[], name=Optional, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodReference(expression=MemberReference(member=foundProps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])], member=ifPresent, postfix_operators=[], prefix_operators=[], qualifier=optionalProp, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=['!'], qualifier=VUE_ATTR_PATTERN, selectors=[MethodInvocation(arguments=[], member=matches, 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=[StatementExpression(expression=MethodInvocation(arguments=[MethodReference(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), method=MemberReference(member=validateStringPropBinding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])], member=ifPresent, postfix_operators=[], prefix_operators=[], qualifier=optionalProp, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setCurrentSegment, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=attribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentProp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=orElse, postfix_operators=[], prefix_operators=[], qualifier=optionalProp, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentExpressionReturnType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=attribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=elementPropertiesType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getExpressionReturnTypeForAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None)], member=processExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=processedExpression)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getValueSegment, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValueSegment, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None), MemberReference(member=processedExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=replace, postfix_operators=[], prefix_operators=[], qualifier=outputDocument, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAttributes, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=attribute)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Attribute, sub_type=None))), label=None)
call[localComponent.ifPresent, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=lc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=foundProps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=validateRequiredProps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), parameters=[MemberReference(member=lc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]
return[member[.shouldPopContext]]
end[}]
END[}] | Keyword[private] Keyword[boolean] identifier[processElementAttributes] operator[SEP] identifier[Element] identifier[element] operator[SEP] {
identifier[Attributes] identifier[attributes] operator[=] identifier[element] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attributes] operator[==] Other[null] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
Keyword[boolean] identifier[shouldPopContext] operator[=] literal[boolean] operator[SEP] identifier[registerMandatoryAttributes] operator[SEP] identifier[attributes] operator[SEP] operator[SEP] identifier[Attribute] identifier[vForAttribute] operator[=] identifier[attributes] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Attribute] identifier[slotScopeAttribute] operator[=] identifier[attributes] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[vForAttribute] operator[!=] Other[null] operator[||] identifier[slotScopeAttribute] operator[!=] Other[null] operator[SEP] {
identifier[shouldPopContext] operator[=] literal[boolean] operator[SEP] identifier[context] operator[SEP] identifier[addContextLayer] operator[SEP] identifier[vForAttribute] operator[!=] Other[null] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[vForAttribute] operator[!=] Other[null] operator[SEP] {
identifier[String] identifier[processedVForValue] operator[=] identifier[processVForValue] operator[SEP] identifier[vForAttribute] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[outputDocument] operator[SEP] identifier[replace] operator[SEP] identifier[vForAttribute] operator[SEP] identifier[getValueSegment] operator[SEP] operator[SEP] , identifier[processedVForValue] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[slotScopeAttribute] operator[!=] Other[null] operator[SEP] {
identifier[String] identifier[processedScopedSlotValue] operator[=] identifier[processSlotScopeValue] operator[SEP] identifier[slotScopeAttribute] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[outputDocument] operator[SEP] identifier[replace] operator[SEP] identifier[slotScopeAttribute] operator[SEP] identifier[getValueSegment] operator[SEP] operator[SEP] , identifier[processedScopedSlotValue] operator[SEP] operator[SEP]
}
identifier[Optional] operator[<] identifier[LocalComponent] operator[>] identifier[localComponent] operator[=] identifier[getLocalComponentForElement] operator[SEP] identifier[element] operator[SEP] operator[SEP] identifier[Attribute] identifier[refAttribute] operator[=] identifier[attributes] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[refAttribute] operator[!=] Other[null] operator[SEP] {
identifier[result] operator[SEP] identifier[addRef] operator[SEP] identifier[refAttribute] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] , identifier[localComponent] operator[SEP] identifier[map] operator[SEP] identifier[LocalComponent] operator[::] identifier[getComponentType] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] identifier[getTypeFromDOMElement] operator[SEP] identifier[element] operator[SEP] operator[SEP] , identifier[context] operator[SEP] identifier[isInVFor] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
identifier[Map] operator[<] identifier[String] , identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[elementPropertiesType] operator[=] identifier[getPropertiesForDOMElement] operator[SEP] identifier[element] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[LocalComponentProp] operator[>] identifier[foundProps] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Attribute] identifier[attribute] operator[:] identifier[element] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] {
identifier[String] identifier[key] operator[=] identifier[attribute] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[key] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[key] operator[SEP] operator[SEP] {
Keyword[continue] operator[SEP]
}
Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[key] operator[SEP] operator[SEP] {
identifier[processVModel] operator[SEP] identifier[attribute] operator[SEP] operator[SEP] Keyword[continue] operator[SEP]
}
identifier[Optional] operator[<] identifier[LocalComponentProp] operator[>] identifier[optionalProp] operator[=] identifier[localComponent] operator[SEP] identifier[flatMap] operator[SEP] identifier[lc] operator[->] identifier[lc] operator[SEP] identifier[getPropForAttribute] operator[SEP] identifier[attribute] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[optionalProp] operator[SEP] identifier[ifPresent] operator[SEP] identifier[foundProps] operator[::] identifier[add] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[VUE_ATTR_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] {
identifier[optionalProp] operator[SEP] identifier[ifPresent] operator[SEP] Keyword[this] operator[::] identifier[validateStringPropBinding] operator[SEP] operator[SEP] Keyword[continue] operator[SEP]
}
identifier[context] operator[SEP] identifier[setCurrentSegment] operator[SEP] identifier[attribute] operator[SEP] operator[SEP] identifier[currentAttribute] operator[=] identifier[attribute] operator[SEP] identifier[currentProp] operator[=] identifier[optionalProp] operator[SEP] identifier[orElse] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[currentExpressionReturnType] operator[=] identifier[getExpressionReturnTypeForAttribute] operator[SEP] identifier[attribute] , identifier[elementPropertiesType] operator[SEP] operator[SEP] identifier[String] identifier[processedExpression] operator[=] identifier[processExpression] operator[SEP] identifier[attribute] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attribute] operator[SEP] identifier[getValueSegment] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] {
identifier[outputDocument] operator[SEP] identifier[replace] operator[SEP] identifier[attribute] operator[SEP] identifier[getValueSegment] operator[SEP] operator[SEP] , identifier[processedExpression] operator[SEP] operator[SEP]
}
}
identifier[localComponent] operator[SEP] identifier[ifPresent] operator[SEP] identifier[lc] operator[->] identifier[validateRequiredProps] operator[SEP] identifier[lc] , identifier[foundProps] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[shouldPopContext] operator[SEP]
}
|
protected void processAssignment(Row row)
{
Resource resource = m_project.getResourceByUniqueID(row.getInteger("RES_UID"));
Task task = m_project.getTaskByUniqueID(row.getInteger("TASK_UID"));
if (task != null)
{
ResourceAssignment assignment = task.addResourceAssignment(resource);
m_assignmentMap.put(row.getInteger("ASSN_UID"), assignment);
assignment.setActualCost(row.getCurrency("ASSN_ACT_COST"));
assignment.setActualFinish(row.getDate("ASSN_ACT_FINISH"));
assignment.setActualOvertimeCost(row.getCurrency("ASSN_ACT_OVT_COST"));
assignment.setActualOvertimeWork(row.getDuration("ASSN_ACT_OVT_WORK"));
assignment.setActualStart(row.getDate("ASSN_ACT_START"));
assignment.setActualWork(row.getDuration("ASSN_ACT_WORK"));
assignment.setACWP(row.getCurrency("ASSN_ACWP"));
assignment.setBaselineCost(row.getCurrency("ASSN_BASE_COST"));
assignment.setBaselineFinish(row.getDate("ASSN_BASE_FINISH"));
assignment.setBaselineStart(row.getDate("ASSN_BASE_START"));
assignment.setBaselineWork(row.getDuration("ASSN_BASE_WORK"));
assignment.setBCWP(row.getCurrency("ASSN_BCWP"));
assignment.setBCWS(row.getCurrency("ASSN_BCWS"));
assignment.setCost(row.getCurrency("ASSN_COST"));
assignment.setCostRateTableIndex(row.getInt("ASSN_COST_RATE_TABLE"));
//assignment.setCostVariance();
//assignment.setCreateDate(row.getDate("ASSN_CREATION_DATE")); - not present in some MPD files?
//assignment.setCV();
assignment.setDelay(row.getDuration("ASSN_DELAY"));
assignment.setFinish(row.getDate("ASSN_FINISH_DATE"));
assignment.setFinishVariance(MPDUtility.getAdjustedDuration(m_project, row.getInt("ASSN_FINISH_VAR"), TimeUnit.DAYS));
//assignment.setGUID();
assignment.setLevelingDelay(MPDUtility.getAdjustedDuration(m_project, row.getInt("ASSN_LEVELING_DELAY"), MPDUtility.getDurationTimeUnits(row.getInt("ASSN_DELAY_FMT"))));
assignment.setLinkedFields(row.getBoolean("ASSN_HAS_LINKED_FIELDS"));
//assignment.setOvertimeCost();
assignment.setOvertimeWork(row.getDuration("ASSN_OVT_WORK"));
//assignment.setPercentageWorkComplete();
assignment.setRemainingCost(row.getCurrency("ASSN_REM_COST"));
assignment.setRemainingOvertimeCost(row.getCurrency("ASSN_REM_OVT_COST"));
assignment.setRemainingOvertimeWork(row.getDuration("ASSN_REM_OVT_WORK"));
assignment.setRegularWork(row.getDuration("ASSN_REG_WORK"));
assignment.setRemainingWork(row.getDuration("ASSN_REM_WORK"));
assignment.setResponsePending(row.getBoolean("ASSN_RESPONSE_PENDING"));
assignment.setStart(row.getDate("ASSN_START_DATE"));
assignment.setStartVariance(MPDUtility.getAdjustedDuration(m_project, row.getInt("ASSN_START_VAR"), TimeUnit.DAYS));
//assignment.setSV();
assignment.setTeamStatusPending(row.getBoolean("ASSN_TEAM_STATUS_PENDING"));
assignment.setUniqueID(row.getInteger("ASSN_UID"));
assignment.setUnits(Double.valueOf(row.getDouble("ASSN_UNITS").doubleValue() * 100.0d));
assignment.setUpdateNeeded(row.getBoolean("ASSN_UPDATE_NEEDED"));
//assignment.setVAC(v);
assignment.setWork(row.getDuration("ASSN_WORK"));
assignment.setWorkContour(WorkContour.getInstance(row.getInt("ASSN_WORK_CONTOUR")));
//assignment.setWorkVariance();
String notes = row.getString("ASSN_RTF_NOTES");
if (notes != null)
{
if (m_preserveNoteFormatting == false)
{
notes = RtfHelper.strip(notes);
}
assignment.setNotes(notes);
}
m_eventManager.fireAssignmentReadEvent(assignment);
}
} | class class_name[name] begin[{]
method[processAssignment, return_type[void], modifier[protected], parameter[row]] begin[{]
local_variable[type[Resource], resource]
local_variable[type[Task], task]
if[binary_operation[member[.task], !=, literal[null]]] begin[{]
local_variable[type[ResourceAssignment], assignment]
call[m_assignmentMap.put, parameter[call[row.getInteger, parameter[literal["ASSN_UID"]]], member[.assignment]]]
call[assignment.setActualCost, parameter[call[row.getCurrency, parameter[literal["ASSN_ACT_COST"]]]]]
call[assignment.setActualFinish, parameter[call[row.getDate, parameter[literal["ASSN_ACT_FINISH"]]]]]
call[assignment.setActualOvertimeCost, parameter[call[row.getCurrency, parameter[literal["ASSN_ACT_OVT_COST"]]]]]
call[assignment.setActualOvertimeWork, parameter[call[row.getDuration, parameter[literal["ASSN_ACT_OVT_WORK"]]]]]
call[assignment.setActualStart, parameter[call[row.getDate, parameter[literal["ASSN_ACT_START"]]]]]
call[assignment.setActualWork, parameter[call[row.getDuration, parameter[literal["ASSN_ACT_WORK"]]]]]
call[assignment.setACWP, parameter[call[row.getCurrency, parameter[literal["ASSN_ACWP"]]]]]
call[assignment.setBaselineCost, parameter[call[row.getCurrency, parameter[literal["ASSN_BASE_COST"]]]]]
call[assignment.setBaselineFinish, parameter[call[row.getDate, parameter[literal["ASSN_BASE_FINISH"]]]]]
call[assignment.setBaselineStart, parameter[call[row.getDate, parameter[literal["ASSN_BASE_START"]]]]]
call[assignment.setBaselineWork, parameter[call[row.getDuration, parameter[literal["ASSN_BASE_WORK"]]]]]
call[assignment.setBCWP, parameter[call[row.getCurrency, parameter[literal["ASSN_BCWP"]]]]]
call[assignment.setBCWS, parameter[call[row.getCurrency, parameter[literal["ASSN_BCWS"]]]]]
call[assignment.setCost, parameter[call[row.getCurrency, parameter[literal["ASSN_COST"]]]]]
call[assignment.setCostRateTableIndex, parameter[call[row.getInt, parameter[literal["ASSN_COST_RATE_TABLE"]]]]]
call[assignment.setDelay, parameter[call[row.getDuration, parameter[literal["ASSN_DELAY"]]]]]
call[assignment.setFinish, parameter[call[row.getDate, parameter[literal["ASSN_FINISH_DATE"]]]]]
call[assignment.setFinishVariance, parameter[call[MPDUtility.getAdjustedDuration, parameter[member[.m_project], call[row.getInt, parameter[literal["ASSN_FINISH_VAR"]]], member[TimeUnit.DAYS]]]]]
call[assignment.setLevelingDelay, parameter[call[MPDUtility.getAdjustedDuration, parameter[member[.m_project], call[row.getInt, parameter[literal["ASSN_LEVELING_DELAY"]]], call[MPDUtility.getDurationTimeUnits, parameter[call[row.getInt, parameter[literal["ASSN_DELAY_FMT"]]]]]]]]]
call[assignment.setLinkedFields, parameter[call[row.getBoolean, parameter[literal["ASSN_HAS_LINKED_FIELDS"]]]]]
call[assignment.setOvertimeWork, parameter[call[row.getDuration, parameter[literal["ASSN_OVT_WORK"]]]]]
call[assignment.setRemainingCost, parameter[call[row.getCurrency, parameter[literal["ASSN_REM_COST"]]]]]
call[assignment.setRemainingOvertimeCost, parameter[call[row.getCurrency, parameter[literal["ASSN_REM_OVT_COST"]]]]]
call[assignment.setRemainingOvertimeWork, parameter[call[row.getDuration, parameter[literal["ASSN_REM_OVT_WORK"]]]]]
call[assignment.setRegularWork, parameter[call[row.getDuration, parameter[literal["ASSN_REG_WORK"]]]]]
call[assignment.setRemainingWork, parameter[call[row.getDuration, parameter[literal["ASSN_REM_WORK"]]]]]
call[assignment.setResponsePending, parameter[call[row.getBoolean, parameter[literal["ASSN_RESPONSE_PENDING"]]]]]
call[assignment.setStart, parameter[call[row.getDate, parameter[literal["ASSN_START_DATE"]]]]]
call[assignment.setStartVariance, parameter[call[MPDUtility.getAdjustedDuration, parameter[member[.m_project], call[row.getInt, parameter[literal["ASSN_START_VAR"]]], member[TimeUnit.DAYS]]]]]
call[assignment.setTeamStatusPending, parameter[call[row.getBoolean, parameter[literal["ASSN_TEAM_STATUS_PENDING"]]]]]
call[assignment.setUniqueID, parameter[call[row.getInteger, parameter[literal["ASSN_UID"]]]]]
call[assignment.setUnits, parameter[call[Double.valueOf, parameter[binary_operation[call[row.getDouble, parameter[literal["ASSN_UNITS"]]], *, literal[100.0d]]]]]]
call[assignment.setUpdateNeeded, parameter[call[row.getBoolean, parameter[literal["ASSN_UPDATE_NEEDED"]]]]]
call[assignment.setWork, parameter[call[row.getDuration, parameter[literal["ASSN_WORK"]]]]]
call[assignment.setWorkContour, parameter[call[WorkContour.getInstance, parameter[call[row.getInt, parameter[literal["ASSN_WORK_CONTOUR"]]]]]]]
local_variable[type[String], notes]
if[binary_operation[member[.notes], !=, literal[null]]] begin[{]
if[binary_operation[member[.m_preserveNoteFormatting], ==, literal[false]]] begin[{]
assign[member[.notes], call[RtfHelper.strip, parameter[member[.notes]]]]
else begin[{]
None
end[}]
call[assignment.setNotes, parameter[member[.notes]]]
else begin[{]
None
end[}]
call[m_eventManager.fireAssignmentReadEvent, parameter[member[.assignment]]]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[processAssignment] operator[SEP] identifier[Row] identifier[row] operator[SEP] {
identifier[Resource] identifier[resource] operator[=] identifier[m_project] operator[SEP] identifier[getResourceByUniqueID] operator[SEP] identifier[row] operator[SEP] identifier[getInteger] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[Task] identifier[task] operator[=] identifier[m_project] operator[SEP] identifier[getTaskByUniqueID] operator[SEP] identifier[row] operator[SEP] identifier[getInteger] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[task] operator[!=] Other[null] operator[SEP] {
identifier[ResourceAssignment] identifier[assignment] operator[=] identifier[task] operator[SEP] identifier[addResourceAssignment] operator[SEP] identifier[resource] operator[SEP] operator[SEP] identifier[m_assignmentMap] operator[SEP] identifier[put] operator[SEP] identifier[row] operator[SEP] identifier[getInteger] operator[SEP] literal[String] operator[SEP] , identifier[assignment] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setActualCost] operator[SEP] identifier[row] operator[SEP] identifier[getCurrency] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setActualFinish] operator[SEP] identifier[row] operator[SEP] identifier[getDate] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setActualOvertimeCost] operator[SEP] identifier[row] operator[SEP] identifier[getCurrency] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setActualOvertimeWork] operator[SEP] identifier[row] operator[SEP] identifier[getDuration] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setActualStart] operator[SEP] identifier[row] operator[SEP] identifier[getDate] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setActualWork] operator[SEP] identifier[row] operator[SEP] identifier[getDuration] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setACWP] operator[SEP] identifier[row] operator[SEP] identifier[getCurrency] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setBaselineCost] operator[SEP] identifier[row] operator[SEP] identifier[getCurrency] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setBaselineFinish] operator[SEP] identifier[row] operator[SEP] identifier[getDate] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setBaselineStart] operator[SEP] identifier[row] operator[SEP] identifier[getDate] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setBaselineWork] operator[SEP] identifier[row] operator[SEP] identifier[getDuration] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setBCWP] operator[SEP] identifier[row] operator[SEP] identifier[getCurrency] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setBCWS] operator[SEP] identifier[row] operator[SEP] identifier[getCurrency] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setCost] operator[SEP] identifier[row] operator[SEP] identifier[getCurrency] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setCostRateTableIndex] operator[SEP] identifier[row] operator[SEP] identifier[getInt] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setDelay] operator[SEP] identifier[row] operator[SEP] identifier[getDuration] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setFinish] operator[SEP] identifier[row] operator[SEP] identifier[getDate] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setFinishVariance] operator[SEP] identifier[MPDUtility] operator[SEP] identifier[getAdjustedDuration] operator[SEP] identifier[m_project] , identifier[row] operator[SEP] identifier[getInt] operator[SEP] literal[String] operator[SEP] , identifier[TimeUnit] operator[SEP] identifier[DAYS] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setLevelingDelay] operator[SEP] identifier[MPDUtility] operator[SEP] identifier[getAdjustedDuration] operator[SEP] identifier[m_project] , identifier[row] operator[SEP] identifier[getInt] operator[SEP] literal[String] operator[SEP] , identifier[MPDUtility] operator[SEP] identifier[getDurationTimeUnits] operator[SEP] identifier[row] operator[SEP] identifier[getInt] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setLinkedFields] operator[SEP] identifier[row] operator[SEP] identifier[getBoolean] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setOvertimeWork] operator[SEP] identifier[row] operator[SEP] identifier[getDuration] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setRemainingCost] operator[SEP] identifier[row] operator[SEP] identifier[getCurrency] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setRemainingOvertimeCost] operator[SEP] identifier[row] operator[SEP] identifier[getCurrency] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setRemainingOvertimeWork] operator[SEP] identifier[row] operator[SEP] identifier[getDuration] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setRegularWork] operator[SEP] identifier[row] operator[SEP] identifier[getDuration] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setRemainingWork] operator[SEP] identifier[row] operator[SEP] identifier[getDuration] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setResponsePending] operator[SEP] identifier[row] operator[SEP] identifier[getBoolean] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setStart] operator[SEP] identifier[row] operator[SEP] identifier[getDate] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setStartVariance] operator[SEP] identifier[MPDUtility] operator[SEP] identifier[getAdjustedDuration] operator[SEP] identifier[m_project] , identifier[row] operator[SEP] identifier[getInt] operator[SEP] literal[String] operator[SEP] , identifier[TimeUnit] operator[SEP] identifier[DAYS] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setTeamStatusPending] operator[SEP] identifier[row] operator[SEP] identifier[getBoolean] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setUniqueID] operator[SEP] identifier[row] operator[SEP] identifier[getInteger] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setUnits] operator[SEP] identifier[Double] operator[SEP] identifier[valueOf] operator[SEP] identifier[row] operator[SEP] identifier[getDouble] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[*] literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setUpdateNeeded] operator[SEP] identifier[row] operator[SEP] identifier[getBoolean] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setWork] operator[SEP] identifier[row] operator[SEP] identifier[getDuration] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[assignment] operator[SEP] identifier[setWorkContour] operator[SEP] identifier[WorkContour] operator[SEP] identifier[getInstance] operator[SEP] identifier[row] operator[SEP] identifier[getInt] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[notes] operator[=] identifier[row] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[notes] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_preserveNoteFormatting] operator[==] literal[boolean] operator[SEP] {
identifier[notes] operator[=] identifier[RtfHelper] operator[SEP] identifier[strip] operator[SEP] identifier[notes] operator[SEP] operator[SEP]
}
identifier[assignment] operator[SEP] identifier[setNotes] operator[SEP] identifier[notes] operator[SEP] operator[SEP]
}
identifier[m_eventManager] operator[SEP] identifier[fireAssignmentReadEvent] operator[SEP] identifier[assignment] operator[SEP] operator[SEP]
}
}
|
@Override
public Object deserialize(Writable blob) {
HiveBitcoinBlock result = null;
if (blob instanceof BitcoinBlock) {
result = convertToHiveBitcoinBlock((BitcoinBlock) blob);
}
return result;
} | class class_name[name] begin[{]
method[deserialize, return_type[type[Object]], modifier[public], parameter[blob]] begin[{]
local_variable[type[HiveBitcoinBlock], result]
if[binary_operation[member[.blob], instanceof, type[BitcoinBlock]]] begin[{]
assign[member[.result], call[.convertToHiveBitcoinBlock, parameter[Cast(expression=MemberReference(member=blob, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BitcoinBlock, sub_type=None))]]]
else begin[{]
None
end[}]
return[member[.result]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[deserialize] operator[SEP] identifier[Writable] identifier[blob] operator[SEP] {
identifier[HiveBitcoinBlock] identifier[result] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[blob] Keyword[instanceof] identifier[BitcoinBlock] operator[SEP] {
identifier[result] operator[=] identifier[convertToHiveBitcoinBlock] operator[SEP] operator[SEP] identifier[BitcoinBlock] operator[SEP] identifier[blob] operator[SEP] operator[SEP]
}
Keyword[return] identifier[result] operator[SEP]
}
|
@Override
public boolean matches(IAtom atom) {
String symbol = atom.getSymbol();
int group = PeriodicTable.getGroup(symbol);
return group == this.groupNumber;
} | class class_name[name] begin[{]
method[matches, return_type[type[boolean]], modifier[public], parameter[atom]] begin[{]
local_variable[type[String], symbol]
local_variable[type[int], group]
return[binary_operation[member[.group], ==, THIS[member[None.groupNumber]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[matches] operator[SEP] identifier[IAtom] identifier[atom] operator[SEP] {
identifier[String] identifier[symbol] operator[=] identifier[atom] operator[SEP] identifier[getSymbol] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[group] operator[=] identifier[PeriodicTable] operator[SEP] identifier[getGroup] operator[SEP] identifier[symbol] operator[SEP] operator[SEP] Keyword[return] identifier[group] operator[==] Keyword[this] operator[SEP] identifier[groupNumber] operator[SEP]
}
|
public static Layout forFile(File file) {
if (file == null) {
throw new IllegalArgumentException("File must not be null");
}
String lowerCaseFileName = file.getName().toLowerCase(Locale.ENGLISH);
if (lowerCaseFileName.endsWith(".jar")) {
return new Jar();
}
if (lowerCaseFileName.endsWith(".war")) {
return new War();
}
if (file.isDirectory() || lowerCaseFileName.endsWith(".zip")) {
return new Expanded();
}
throw new IllegalStateException("Unable to deduce layout for '" + file + "'");
} | class class_name[name] begin[{]
method[forFile, return_type[type[Layout]], modifier[public static], parameter[file]] begin[{]
if[binary_operation[member[.file], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="File must not be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)
else begin[{]
None
end[}]
local_variable[type[String], lowerCaseFileName]
if[call[lowerCaseFileName.endsWith, parameter[literal[".jar"]]]] begin[{]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Jar, sub_type=None))]
else begin[{]
None
end[}]
if[call[lowerCaseFileName.endsWith, parameter[literal[".war"]]]] begin[{]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=War, sub_type=None))]
else begin[{]
None
end[}]
if[binary_operation[call[file.isDirectory, parameter[]], ||, call[lowerCaseFileName.endsWith, parameter[literal[".zip"]]]]] begin[{]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Expanded, sub_type=None))]
else begin[{]
None
end[}]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to deduce layout for '"), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Layout] identifier[forFile] operator[SEP] identifier[File] identifier[file] operator[SEP] {
Keyword[if] operator[SEP] identifier[file] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
identifier[String] identifier[lowerCaseFileName] operator[=] identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[Locale] operator[SEP] identifier[ENGLISH] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lowerCaseFileName] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[Jar] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[lowerCaseFileName] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[War] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[||] identifier[lowerCaseFileName] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[Expanded] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[file] operator[+] literal[String] operator[SEP] operator[SEP]
}
|
public Matrix4f scaleAround(float sx, float sy, float sz, float ox, float oy, float oz, Matrix4f dest) {
float nm30 = m00 * ox + m10 * oy + m20 * oz + m30;
float nm31 = m01 * ox + m11 * oy + m21 * oz + m31;
float nm32 = m02 * ox + m12 * oy + m22 * oz + m32;
float nm33 = m03 * ox + m13 * oy + m23 * oz + m33;
dest._m00(m00 * sx);
dest._m01(m01 * sx);
dest._m02(m02 * sx);
dest._m03(m03 * sx);
dest._m10(m10 * sy);
dest._m11(m11 * sy);
dest._m12(m12 * sy);
dest._m13(m13 * sy);
dest._m20(m20 * sz);
dest._m21(m21 * sz);
dest._m22(m22 * sz);
dest._m23(m23 * sz);
dest._m30(-m00 * ox - m10 * oy - m20 * oz + nm30);
dest._m31(-m01 * ox - m11 * oy - m21 * oz + nm31);
dest._m32(-m02 * ox - m12 * oy - m22 * oz + nm32);
dest._m33(-m03 * ox - m13 * oy - m23 * oz + nm33);
boolean one = Math.abs(sx) == 1.0f && Math.abs(sy) == 1.0f && Math.abs(sz) == 1.0f;
dest._properties(properties & ~(PROPERTY_PERSPECTIVE | PROPERTY_IDENTITY | PROPERTY_TRANSLATION
| (one ? 0 : PROPERTY_ORTHONORMAL)));
return dest;
} | class class_name[name] begin[{]
method[scaleAround, return_type[type[Matrix4f]], modifier[public], parameter[sx, sy, sz, ox, oy, oz, dest]] begin[{]
local_variable[type[float], nm30]
local_variable[type[float], nm31]
local_variable[type[float], nm32]
local_variable[type[float], nm33]
call[dest._m00, parameter[binary_operation[member[.m00], *, member[.sx]]]]
call[dest._m01, parameter[binary_operation[member[.m01], *, member[.sx]]]]
call[dest._m02, parameter[binary_operation[member[.m02], *, member[.sx]]]]
call[dest._m03, parameter[binary_operation[member[.m03], *, member[.sx]]]]
call[dest._m10, parameter[binary_operation[member[.m10], *, member[.sy]]]]
call[dest._m11, parameter[binary_operation[member[.m11], *, member[.sy]]]]
call[dest._m12, parameter[binary_operation[member[.m12], *, member[.sy]]]]
call[dest._m13, parameter[binary_operation[member[.m13], *, member[.sy]]]]
call[dest._m20, parameter[binary_operation[member[.m20], *, member[.sz]]]]
call[dest._m21, parameter[binary_operation[member[.m21], *, member[.sz]]]]
call[dest._m22, parameter[binary_operation[member[.m22], *, member[.sz]]]]
call[dest._m23, parameter[binary_operation[member[.m23], *, member[.sz]]]]
call[dest._m30, parameter[binary_operation[binary_operation[binary_operation[binary_operation[member[.m00], *, member[.ox]], -, binary_operation[member[.m10], *, member[.oy]]], -, binary_operation[member[.m20], *, member[.oz]]], +, member[.nm30]]]]
call[dest._m31, parameter[binary_operation[binary_operation[binary_operation[binary_operation[member[.m01], *, member[.ox]], -, binary_operation[member[.m11], *, member[.oy]]], -, binary_operation[member[.m21], *, member[.oz]]], +, member[.nm31]]]]
call[dest._m32, parameter[binary_operation[binary_operation[binary_operation[binary_operation[member[.m02], *, member[.ox]], -, binary_operation[member[.m12], *, member[.oy]]], -, binary_operation[member[.m22], *, member[.oz]]], +, member[.nm32]]]]
call[dest._m33, parameter[binary_operation[binary_operation[binary_operation[binary_operation[member[.m03], *, member[.ox]], -, binary_operation[member[.m13], *, member[.oy]]], -, binary_operation[member[.m23], *, member[.oz]]], +, member[.nm33]]]]
local_variable[type[boolean], one]
call[dest._properties, parameter[binary_operation[member[.properties], &, binary_operation[binary_operation[binary_operation[member[.PROPERTY_PERSPECTIVE], |, member[.PROPERTY_IDENTITY]], |, member[.PROPERTY_TRANSLATION]], |, TernaryExpression(condition=MemberReference(member=one, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=PROPERTY_ORTHONORMAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]]]]
return[member[.dest]]
end[}]
END[}] | Keyword[public] identifier[Matrix4f] identifier[scaleAround] operator[SEP] Keyword[float] identifier[sx] , Keyword[float] identifier[sy] , Keyword[float] identifier[sz] , Keyword[float] identifier[ox] , Keyword[float] identifier[oy] , Keyword[float] identifier[oz] , identifier[Matrix4f] identifier[dest] operator[SEP] {
Keyword[float] identifier[nm30] operator[=] identifier[m00] operator[*] identifier[ox] operator[+] identifier[m10] operator[*] identifier[oy] operator[+] identifier[m20] operator[*] identifier[oz] operator[+] identifier[m30] operator[SEP] Keyword[float] identifier[nm31] operator[=] identifier[m01] operator[*] identifier[ox] operator[+] identifier[m11] operator[*] identifier[oy] operator[+] identifier[m21] operator[*] identifier[oz] operator[+] identifier[m31] operator[SEP] Keyword[float] identifier[nm32] operator[=] identifier[m02] operator[*] identifier[ox] operator[+] identifier[m12] operator[*] identifier[oy] operator[+] identifier[m22] operator[*] identifier[oz] operator[+] identifier[m32] operator[SEP] Keyword[float] identifier[nm33] operator[=] identifier[m03] operator[*] identifier[ox] operator[+] identifier[m13] operator[*] identifier[oy] operator[+] identifier[m23] operator[*] identifier[oz] operator[+] identifier[m33] operator[SEP] identifier[dest] operator[SEP] identifier[_m00] operator[SEP] identifier[m00] operator[*] identifier[sx] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m01] operator[SEP] identifier[m01] operator[*] identifier[sx] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m02] operator[SEP] identifier[m02] operator[*] identifier[sx] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m03] operator[SEP] identifier[m03] operator[*] identifier[sx] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m10] operator[SEP] identifier[m10] operator[*] identifier[sy] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m11] operator[SEP] identifier[m11] operator[*] identifier[sy] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m12] operator[SEP] identifier[m12] operator[*] identifier[sy] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m13] operator[SEP] identifier[m13] operator[*] identifier[sy] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m20] operator[SEP] identifier[m20] operator[*] identifier[sz] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m21] operator[SEP] identifier[m21] operator[*] identifier[sz] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m22] operator[SEP] identifier[m22] operator[*] identifier[sz] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m23] operator[SEP] identifier[m23] operator[*] identifier[sz] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m30] operator[SEP] operator[-] identifier[m00] operator[*] identifier[ox] operator[-] identifier[m10] operator[*] identifier[oy] operator[-] identifier[m20] operator[*] identifier[oz] operator[+] identifier[nm30] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m31] operator[SEP] operator[-] identifier[m01] operator[*] identifier[ox] operator[-] identifier[m11] operator[*] identifier[oy] operator[-] identifier[m21] operator[*] identifier[oz] operator[+] identifier[nm31] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m32] operator[SEP] operator[-] identifier[m02] operator[*] identifier[ox] operator[-] identifier[m12] operator[*] identifier[oy] operator[-] identifier[m22] operator[*] identifier[oz] operator[+] identifier[nm32] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m33] operator[SEP] operator[-] identifier[m03] operator[*] identifier[ox] operator[-] identifier[m13] operator[*] identifier[oy] operator[-] identifier[m23] operator[*] identifier[oz] operator[+] identifier[nm33] operator[SEP] operator[SEP] Keyword[boolean] identifier[one] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[sx] operator[SEP] operator[==] literal[Float] operator[&&] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[sy] operator[SEP] operator[==] literal[Float] operator[&&] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[sz] operator[SEP] operator[==] literal[Float] operator[SEP] identifier[dest] operator[SEP] identifier[_properties] operator[SEP] identifier[properties] operator[&] operator[~] operator[SEP] identifier[PROPERTY_PERSPECTIVE] operator[|] identifier[PROPERTY_IDENTITY] operator[|] identifier[PROPERTY_TRANSLATION] operator[|] operator[SEP] identifier[one] operator[?] Other[0] operator[:] identifier[PROPERTY_ORTHONORMAL] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[dest] operator[SEP]
}
|
public void copy()
throws UrlCopyException {
if (srcUrl == null) {
throw new UrlCopyException("Source url is not specified");
}
if (dstUrl == null) {
throw new UrlCopyException("Destination url is not specified");
}
String fromP = srcUrl.getProtocol();
String toP = dstUrl.getProtocol();
if (thirdParty && fromP.endsWith("ftp") && toP.endsWith("ftp")) {
thirdPartyTransfer();
return;
}
GlobusInputStream in = null;
GlobusOutputStream out = null;
boolean rs = false;
try {
in = getInputStream();
long size = in.getSize();
if (size == -1) {
logger.debug("Source size: unknown");
} else {
logger.debug("Source size: " + size);
}
out = getOutputStream(size);
rs = transfer(size, in, out);
in.close();
out.close();
} catch(Exception e) {
if (out != null) out.abort();
if (in != null) in.abort();
throw new UrlCopyException("UrlCopy transfer failed.", e);
}
if (!rs && isCanceled()) {
throw new UrlCopyException("Transfer Aborted");
}
} | class class_name[name] begin[{]
method[copy, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.srcUrl], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Source url is not specified")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UrlCopyException, sub_type=None)), label=None)
else begin[{]
None
end[}]
if[binary_operation[member[.dstUrl], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Destination url is not specified")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UrlCopyException, sub_type=None)), label=None)
else begin[{]
None
end[}]
local_variable[type[String], fromP]
local_variable[type[String], toP]
if[binary_operation[binary_operation[member[.thirdParty], &&, call[fromP.endsWith, parameter[literal["ftp"]]]], &&, call[toP.endsWith, parameter[literal["ftp"]]]]] begin[{]
call[.thirdPartyTransfer, parameter[]]
return[None]
else begin[{]
None
end[}]
local_variable[type[GlobusInputStream], in]
local_variable[type[GlobusOutputStream], out]
local_variable[type[boolean], rs]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSize, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), name=size)], modifiers=set(), type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Source size: "), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, 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="Source size: unknown")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOutputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=rs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=transfer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[], member=abort, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[], member=abort, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), label=None)), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UrlCopy transfer failed."), 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=UrlCopyException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)
if[binary_operation[member[.rs], &&, call[.isCanceled, parameter[]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Transfer Aborted")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UrlCopyException, sub_type=None)), label=None)
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[copy] operator[SEP] operator[SEP] Keyword[throws] identifier[UrlCopyException] {
Keyword[if] operator[SEP] identifier[srcUrl] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[UrlCopyException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[dstUrl] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[UrlCopyException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
identifier[String] identifier[fromP] operator[=] identifier[srcUrl] operator[SEP] identifier[getProtocol] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[toP] operator[=] identifier[dstUrl] operator[SEP] identifier[getProtocol] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[thirdParty] operator[&&] identifier[fromP] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[toP] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] {
identifier[thirdPartyTransfer] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP]
}
identifier[GlobusInputStream] identifier[in] operator[=] Other[null] operator[SEP] identifier[GlobusOutputStream] identifier[out] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[rs] operator[=] literal[boolean] operator[SEP] Keyword[try] {
identifier[in] operator[=] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[size] operator[=] identifier[in] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[size] operator[==] operator[-] Other[1] operator[SEP] {
identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[size] operator[SEP] operator[SEP]
}
identifier[out] operator[=] identifier[getOutputStream] operator[SEP] identifier[size] operator[SEP] operator[SEP] identifier[rs] operator[=] identifier[transfer] operator[SEP] identifier[size] , identifier[in] , identifier[out] operator[SEP] operator[SEP] identifier[in] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] {
Keyword[if] operator[SEP] identifier[out] operator[!=] Other[null] operator[SEP] identifier[out] operator[SEP] identifier[abort] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[in] operator[!=] Other[null] operator[SEP] identifier[in] operator[SEP] identifier[abort] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[UrlCopyException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] operator[!] identifier[rs] operator[&&] identifier[isCanceled] operator[SEP] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[UrlCopyException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
}
|
public static boolean isModal(Component component) {
synchronized (modals) {
Iterator<Entry<RootPaneContainer, Modal>> it =
modals.entrySet().iterator();
while (it.hasNext()) {
Entry<RootPaneContainer, Modal> entry = it.next();
if (entry.getValue().components.contains(component)) {
return true;
}
}
return false;
}
} | class class_name[name] begin[{]
method[isModal, return_type[type[boolean]], modifier[public static], parameter[component]] begin[{]
SYNCHRONIZED[member[.modals]] BEGIN[{]
local_variable[type[Iterator], it]
while[call[it.hasNext, parameter[]]] begin[{]
local_variable[type[Entry], entry]
if[call[entry.getValue, parameter[]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
end[}]
return[literal[false]]
END[}]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[boolean] identifier[isModal] operator[SEP] identifier[Component] identifier[component] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[modals] operator[SEP] {
identifier[Iterator] operator[<] identifier[Entry] operator[<] identifier[RootPaneContainer] , identifier[Modal] operator[>] operator[>] identifier[it] operator[=] identifier[modals] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] {
identifier[Entry] operator[<] identifier[RootPaneContainer] , identifier[Modal] operator[>] identifier[entry] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[components] operator[SEP] identifier[contains] operator[SEP] identifier[component] operator[SEP] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
}
Keyword[return] literal[boolean] operator[SEP]
}
}
|
@XmlElementDecl(namespace = "http://www.opengis.net/citygml/tunnel/2.0", name = "RoofSurface", substitutionHeadNamespace = "http://www.opengis.net/citygml/tunnel/2.0", substitutionHeadName = "_BoundarySurface")
public JAXBElement<RoofSurfaceType> createRoofSurface(RoofSurfaceType value) {
return new JAXBElement<RoofSurfaceType>(_RoofSurface_QNAME, RoofSurfaceType.class, null, value);
} | class class_name[name] begin[{]
method[createRoofSurface, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=_RoofSurface_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RoofSurfaceType, 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=RoofSurfaceType, 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] , identifier[substitutionHeadNamespace] operator[=] literal[String] , identifier[substitutionHeadName] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[RoofSurfaceType] operator[>] identifier[createRoofSurface] operator[SEP] identifier[RoofSurfaceType] identifier[value] operator[SEP] {
Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[RoofSurfaceType] operator[>] operator[SEP] identifier[_RoofSurface_QNAME] , identifier[RoofSurfaceType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP]
}
|
public boolean
findRRset(Name name, int type) {
return (findRRset(name, type, Section.ANSWER) ||
findRRset(name, type, Section.AUTHORITY) ||
findRRset(name, type, Section.ADDITIONAL));
} | class class_name[name] begin[{]
method[findRRset, return_type[type[boolean]], modifier[public], parameter[name, type]] begin[{]
return[binary_operation[binary_operation[call[.findRRset, parameter[member[.name], member[.type], member[Section.ANSWER]]], ||, call[.findRRset, parameter[member[.name], member[.type], member[Section.AUTHORITY]]]], ||, call[.findRRset, parameter[member[.name], member[.type], member[Section.ADDITIONAL]]]]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[findRRset] operator[SEP] identifier[Name] identifier[name] , Keyword[int] identifier[type] operator[SEP] {
Keyword[return] operator[SEP] identifier[findRRset] operator[SEP] identifier[name] , identifier[type] , identifier[Section] operator[SEP] identifier[ANSWER] operator[SEP] operator[||] identifier[findRRset] operator[SEP] identifier[name] , identifier[type] , identifier[Section] operator[SEP] identifier[AUTHORITY] operator[SEP] operator[||] identifier[findRRset] operator[SEP] identifier[name] , identifier[type] , identifier[Section] operator[SEP] identifier[ADDITIONAL] operator[SEP] operator[SEP] operator[SEP]
}
|
public F0<R> orElse(final Func0<? extends R> fallback) {
final F0<R> me = this;
return new F0<R>() {
@Override
public R apply() {
try {
return me.apply();
} catch (RuntimeException e) {
return fallback.apply();
}
}
};
} | class class_name[name] begin[{]
method[orElse, return_type[type[F0]], modifier[public], parameter[fallback]] begin[{]
local_variable[type[F0], me]
return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=apply, postfix_operators=[], prefix_operators=[], qualifier=me, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=apply, postfix_operators=[], prefix_operators=[], qualifier=fallback, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RuntimeException']))], finally_block=None, label=None, resources=None)], documentation=None, modifiers={'public'}, name=apply, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=R, 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=R, sub_type=None))], dimensions=None, name=F0, sub_type=None))]
end[}]
END[}] | Keyword[public] identifier[F0] operator[<] identifier[R] operator[>] identifier[orElse] operator[SEP] Keyword[final] identifier[Func0] operator[<] operator[?] Keyword[extends] identifier[R] operator[>] identifier[fallback] operator[SEP] {
Keyword[final] identifier[F0] operator[<] identifier[R] operator[>] identifier[me] operator[=] Keyword[this] operator[SEP] Keyword[return] Keyword[new] identifier[F0] operator[<] identifier[R] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] identifier[R] identifier[apply] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[me] operator[SEP] identifier[apply] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[e] operator[SEP] {
Keyword[return] identifier[fallback] operator[SEP] identifier[apply] operator[SEP] operator[SEP] operator[SEP]
}
}
} operator[SEP]
}
|
protected void invokeDelegate(
EventFilter delegate, EventRequest request, EventResponse response, FilterChain filterChain)
throws PortletException, IOException {
delegate.doFilter(request, response, filterChain);
} | class class_name[name] begin[{]
method[invokeDelegate, return_type[void], modifier[protected], parameter[delegate, request, response, filterChain]] begin[{]
call[delegate.doFilter, parameter[member[.request], member[.response], member[.filterChain]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[invokeDelegate] operator[SEP] identifier[EventFilter] identifier[delegate] , identifier[EventRequest] identifier[request] , identifier[EventResponse] identifier[response] , identifier[FilterChain] identifier[filterChain] operator[SEP] Keyword[throws] identifier[PortletException] , identifier[IOException] {
identifier[delegate] operator[SEP] identifier[doFilter] operator[SEP] identifier[request] , identifier[response] , identifier[filterChain] operator[SEP] operator[SEP]
}
|
public void billingAccount_line_serviceName_phone_phonebook_bookKey_DELETE(String billingAccount, String serviceName, String bookKey) throws IOException {
String qPath = "/telephony/{billingAccount}/line/{serviceName}/phone/phonebook/{bookKey}";
StringBuilder sb = path(qPath, billingAccount, serviceName, bookKey);
exec(qPath, "DELETE", sb.toString(), null);
} | class class_name[name] begin[{]
method[billingAccount_line_serviceName_phone_phonebook_bookKey_DELETE, return_type[void], modifier[public], parameter[billingAccount, serviceName, bookKey]] begin[{]
local_variable[type[String], qPath]
local_variable[type[StringBuilder], sb]
call[.exec, parameter[member[.qPath], literal["DELETE"], call[sb.toString, parameter[]], literal[null]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[billingAccount_line_serviceName_phone_phonebook_bookKey_DELETE] operator[SEP] identifier[String] identifier[billingAccount] , identifier[String] identifier[serviceName] , identifier[String] identifier[bookKey] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[billingAccount] , identifier[serviceName] , identifier[bookKey] operator[SEP] operator[SEP] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP]
}
|
public Matrix4d rotateZ(double ang, Matrix4d dest) {
if ((properties & PROPERTY_IDENTITY) != 0)
return dest.rotationZ(ang);
double sin = Math.sin(ang);
double cos = Math.cosFromSin(sin, ang);
return rotateTowardsXY(sin, cos, dest);
} | class class_name[name] begin[{]
method[rotateZ, return_type[type[Matrix4d]], modifier[public], parameter[ang, dest]] begin[{]
if[binary_operation[binary_operation[member[.properties], &, member[.PROPERTY_IDENTITY]], !=, literal[0]]] begin[{]
return[call[dest.rotationZ, parameter[member[.ang]]]]
else begin[{]
None
end[}]
local_variable[type[double], sin]
local_variable[type[double], cos]
return[call[.rotateTowardsXY, parameter[member[.sin], member[.cos], member[.dest]]]]
end[}]
END[}] | Keyword[public] identifier[Matrix4d] identifier[rotateZ] operator[SEP] Keyword[double] identifier[ang] , identifier[Matrix4d] identifier[dest] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] identifier[properties] operator[&] identifier[PROPERTY_IDENTITY] operator[SEP] operator[!=] Other[0] operator[SEP] Keyword[return] identifier[dest] operator[SEP] identifier[rotationZ] operator[SEP] identifier[ang] operator[SEP] operator[SEP] Keyword[double] identifier[sin] operator[=] identifier[Math] operator[SEP] identifier[sin] operator[SEP] identifier[ang] operator[SEP] operator[SEP] Keyword[double] identifier[cos] operator[=] identifier[Math] operator[SEP] identifier[cosFromSin] operator[SEP] identifier[sin] , identifier[ang] operator[SEP] operator[SEP] Keyword[return] identifier[rotateTowardsXY] operator[SEP] identifier[sin] , identifier[cos] , identifier[dest] operator[SEP] operator[SEP]
}
|
public static Class<?> loadClass(String className) throws ClassNotFoundException {
try {
return Thread.currentThread().getContextClassLoader().loadClass(className);
} catch (ClassNotFoundException e) {
try {
return Class.forName(className);
} catch (ClassNotFoundException ex) {
try {
return ClassLoader.class.getClassLoader().loadClass(className);
} catch (ClassNotFoundException exc) {
throw exc;
}
}
}
} | class class_name[name] begin[{]
method[loadClass, return_type[type[Class]], modifier[public static], parameter[className]] begin[{]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[MethodInvocation(arguments=[], member=getContextClassLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[TryStatement(block=[ReturnStatement(expression=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getClassLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ClassLoader, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=exc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exc, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None)
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[loadClass] operator[SEP] identifier[String] identifier[className] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] {
Keyword[try] {
Keyword[return] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getContextClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[loadClass] operator[SEP] identifier[className] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[className] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[ex] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[ClassLoader] operator[SEP] Keyword[class] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[loadClass] operator[SEP] identifier[className] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[exc] operator[SEP] {
Keyword[throw] identifier[exc] operator[SEP]
}
}
}
}
|
public final void methodBody() throws RecognitionException {
int methodBody_StartIndex = input.index();
try {
if ( state.backtracking>0 && alreadyParsedRule(input, 59) ) { return; }
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:579:5: ( block )
// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:579:7: block
{
pushFollow(FOLLOW_block_in_methodBody2106);
block();
state._fsp--;
if (state.failed) return;
}
}
catch (RecognitionException re) {
reportError(re);
recover(input,re);
}
finally {
// do for sure before leaving
if ( state.backtracking>0 ) { memoize(input, 59, methodBody_StartIndex); }
}
} | class class_name[name] begin[{]
method[methodBody, return_type[void], modifier[final public], parameter[]] begin[{]
local_variable[type[int], methodBody_StartIndex]
TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operandr=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=59)], member=alreadyParsedRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=None, label=None)])), BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_block_in_methodBody2106, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))])], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reportError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=59), MemberReference(member=methodBody_StartIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=memoize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None)
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[void] identifier[methodBody] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[int] identifier[methodBody_StartIndex] operator[=] identifier[input] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[&&] identifier[alreadyParsedRule] operator[SEP] identifier[input] , Other[59] operator[SEP] operator[SEP] {
Keyword[return] operator[SEP]
} {
identifier[pushFollow] operator[SEP] identifier[FOLLOW_block_in_methodBody2106] operator[SEP] operator[SEP] identifier[block] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP]
}
}
Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] {
identifier[reportError] operator[SEP] identifier[re] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP]
}
Keyword[finally] {
Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] {
identifier[memoize] operator[SEP] identifier[input] , Other[59] , identifier[methodBody_StartIndex] operator[SEP] operator[SEP]
}
}
}
|
public static void main(String[] args) {
java.util.Random r = new java.util.Random();
Bits bits = new Bits();
for (int i=0; i<125; i++) {
int k;
do {
k = r.nextInt(250);
} while (bits.isMember(k));
System.out.println("adding " + k);
bits.incl(k);
}
int count = 0;
for (int i = bits.nextBit(0); i >= 0; i = bits.nextBit(i+1)) {
System.out.println("found " + i);
count ++;
}
if (count != 125) {
throw new Error();
}
} | class class_name[name] begin[{]
method[main, return_type[void], modifier[public static], parameter[args]] begin[{]
local_variable[type[java], r]
local_variable[type[Bits], bits]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), DoStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=250)], member=nextInt, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[], type_arguments=None)), label=None)]), condition=MethodInvocation(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isMember, postfix_operators=[], prefix_operators=[], qualifier=bits, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="adding "), operandr=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=incl, postfix_operators=[], prefix_operators=[], qualifier=bits, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=125), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
local_variable[type[int], count]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="found "), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=count, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=nextBit, postfix_operators=[], prefix_operators=[], qualifier=bits, selectors=[], type_arguments=None), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=nextBit, postfix_operators=[], prefix_operators=[], qualifier=bits, selectors=[], type_arguments=None))]), label=None)
if[binary_operation[member[.count], !=, literal[125]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Error, sub_type=None)), label=None)
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] {
identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Random] identifier[r] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Random] operator[SEP] operator[SEP] operator[SEP] identifier[Bits] identifier[bits] operator[=] Keyword[new] identifier[Bits] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] Other[125] operator[SEP] identifier[i] operator[++] operator[SEP] {
Keyword[int] identifier[k] operator[SEP] Keyword[do] {
identifier[k] operator[=] identifier[r] operator[SEP] identifier[nextInt] operator[SEP] Other[250] operator[SEP] operator[SEP]
}
Keyword[while] operator[SEP] identifier[bits] operator[SEP] identifier[isMember] operator[SEP] identifier[k] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[k] operator[SEP] operator[SEP] identifier[bits] operator[SEP] identifier[incl] operator[SEP] identifier[k] operator[SEP] operator[SEP]
}
Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[bits] operator[SEP] identifier[nextBit] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] identifier[i] operator[=] identifier[bits] operator[SEP] identifier[nextBit] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] {
identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[i] operator[SEP] operator[SEP] identifier[count] operator[++] operator[SEP]
}
Keyword[if] operator[SEP] identifier[count] operator[!=] Other[125] operator[SEP] {
Keyword[throw] Keyword[new] identifier[Error] operator[SEP] operator[SEP] operator[SEP]
}
}
|
public int readUnsignedInt() {
int variableByteDecode = 0;
byte variableByteShift = 0;
// check if the continuation bit is set
while ((this.bufferData[this.bufferPosition] & 0x80) != 0) {
variableByteDecode |= (this.bufferData[this.bufferPosition++] & 0x7f) << variableByteShift;
variableByteShift += 7;
}
// read the seven data bits from the last byte
return variableByteDecode | (this.bufferData[this.bufferPosition++] << variableByteShift);
} | class class_name[name] begin[{]
method[readUnsignedInt, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[int], variableByteDecode]
local_variable[type[byte], variableByteShift]
while[binary_operation[binary_operation[THIS[member[None.bufferData]ArraySelector(index=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=bufferPosition, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]))], &, literal[0x80]], !=, literal[0]]] begin[{]
assign[member[.variableByteDecode], binary_operation[binary_operation[THIS[member[None.bufferData]ArraySelector(index=This(postfix_operators=['++'], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=bufferPosition, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]))], &, literal[0x7f]], <<, member[.variableByteShift]]]
assign[member[.variableByteShift], literal[7]]
end[}]
return[binary_operation[member[.variableByteDecode], |, binary_operation[THIS[member[None.bufferData]ArraySelector(index=This(postfix_operators=['++'], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=bufferPosition, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]))], <<, member[.variableByteShift]]]]
end[}]
END[}] | Keyword[public] Keyword[int] identifier[readUnsignedInt] operator[SEP] operator[SEP] {
Keyword[int] identifier[variableByteDecode] operator[=] Other[0] operator[SEP] Keyword[byte] identifier[variableByteShift] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[bufferData] operator[SEP] Keyword[this] operator[SEP] identifier[bufferPosition] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[!=] Other[0] operator[SEP] {
identifier[variableByteDecode] operator[|=] operator[SEP] Keyword[this] operator[SEP] identifier[bufferData] operator[SEP] Keyword[this] operator[SEP] identifier[bufferPosition] operator[++] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] identifier[variableByteShift] operator[SEP] identifier[variableByteShift] operator[+=] Other[7] operator[SEP]
}
Keyword[return] identifier[variableByteDecode] operator[|] operator[SEP] Keyword[this] operator[SEP] identifier[bufferData] operator[SEP] Keyword[this] operator[SEP] identifier[bufferPosition] operator[++] operator[SEP] operator[<<] identifier[variableByteShift] operator[SEP] operator[SEP]
}
|
protected void sleep(long ms) throws IOException {
try {
Thread.sleep(ms);
} catch (InterruptedException e) {
LOG.error("Interrupted when sleeping", e);
Thread.currentThread().interrupt();
throw new IOException("Received interruption");
}
} | class class_name[name] begin[{]
method[sleep, return_type[void], modifier[protected], parameter[ms]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sleep, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Interrupted when sleeping"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[MethodInvocation(arguments=[], member=interrupt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Received interruption")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException']))], finally_block=None, label=None, resources=None)
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[sleep] operator[SEP] Keyword[long] identifier[ms] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[try] {
identifier[Thread] operator[SEP] identifier[sleep] operator[SEP] identifier[ms] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] {
identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[interrupt] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
}
|
public static <T> ImmutableMap<T, Integer> itemToIndexMapStartingFrom(final Iterable<T> sequence,
int startFrom) {
final ImmutableMap.Builder<T, Integer> ret = ImmutableMap.builder();
int idx = startFrom;
for (final T item : sequence) {
ret.put(item, idx);
++idx;
}
return ret.build();
} | class class_name[name] begin[{]
method[itemToIndexMapStartingFrom, return_type[type[ImmutableMap]], modifier[public static], parameter[sequence, startFrom]] begin[{]
local_variable[type[ImmutableMap], ret]
local_variable[type[int], idx]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=ret, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=idx, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=sequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=item)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))), label=None)
return[call[ret.build, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[ImmutableMap] operator[<] identifier[T] , identifier[Integer] operator[>] identifier[itemToIndexMapStartingFrom] operator[SEP] Keyword[final] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[sequence] , Keyword[int] identifier[startFrom] operator[SEP] {
Keyword[final] identifier[ImmutableMap] operator[SEP] identifier[Builder] operator[<] identifier[T] , identifier[Integer] operator[>] identifier[ret] operator[=] identifier[ImmutableMap] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[idx] operator[=] identifier[startFrom] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[T] identifier[item] operator[:] identifier[sequence] operator[SEP] {
identifier[ret] operator[SEP] identifier[put] operator[SEP] identifier[item] , identifier[idx] operator[SEP] operator[SEP] operator[++] identifier[idx] operator[SEP]
}
Keyword[return] identifier[ret] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP]
}
|
public void addListener(ValidationObject object, String name, SetterListener listener) {
m_validationEngine.addListener(object, name, this, listener);
} | class class_name[name] begin[{]
method[addListener, return_type[void], modifier[public], parameter[object, name, listener]] begin[{]
call[m_validationEngine.addListener, parameter[member[.object], member[.name], THIS[], member[.listener]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[addListener] operator[SEP] identifier[ValidationObject] identifier[object] , identifier[String] identifier[name] , identifier[SetterListener] identifier[listener] operator[SEP] {
identifier[m_validationEngine] operator[SEP] identifier[addListener] operator[SEP] identifier[object] , identifier[name] , Keyword[this] , identifier[listener] operator[SEP] operator[SEP]
}
|
public Filter getDefaultFilter(final String filterString) {
return new Filter() {
private static final long serialVersionUID = 1L;
@SuppressWarnings("synthetic-access")
public boolean appliesToProperty(Object propertyId) {
for (ColumnBean col : m_columns) {
if (col.getProperty().getName().equals(propertyId) && col.getInfo().filterable()) {
return true;
}
}
return false;
}
@SuppressWarnings("synthetic-access")
public boolean passesFilter(Object itemId, Item item) throws UnsupportedOperationException {
if (CmsStringUtil.isEmpty(filterString)) {
return true;
}
T bean = (T)itemId;
for (ColumnBean col : m_columns) {
if (col.getInfo().filterable()) {
if (("" + item.getItemProperty(col.getProperty().getName()).getValue()).toLowerCase().contains(
filterString)) {
return true;
}
}
}
return false;
}
};
} | class class_name[name] begin[{]
method[getDefaultFilter, return_type[type[Filter]], modifier[public], parameter[filterString]] begin[{]
return[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1L), name=serialVersionUID)], documentation=None, modifiers={'final', 'private', 'static'}, type=BasicType(dimensions=[], name=long)), MethodDeclaration(annotations=[Annotation(element=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="synthetic-access"), name=SuppressWarnings)], body=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=col, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=propertyId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getInfo, postfix_operators=[], prefix_operators=[], qualifier=col, selectors=[MethodInvocation(arguments=[], member=filterable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=m_columns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=col)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ColumnBean, sub_type=None))), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], documentation=None, modifiers={'public'}, name=appliesToProperty, parameters=[FormalParameter(annotations=[], modifiers=set(), name=propertyId, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="synthetic-access"), name=SuppressWarnings)], body=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=filterString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=CmsStringUtil, 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=true), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=itemId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), name=bean)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getInfo, postfix_operators=[], prefix_operators=[], qualifier=col, selectors=[MethodInvocation(arguments=[], member=filterable, 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=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=col, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=getItemProperty, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[MethodInvocation(arguments=[], member=getValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=m_columns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=col)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ColumnBean, sub_type=None))), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], documentation=None, modifiers={'public'}, name=passesFilter, parameters=[FormalParameter(annotations=[], modifiers=set(), name=itemId, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=item, type=ReferenceType(arguments=None, dimensions=[], name=Item, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=['UnsupportedOperationException'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Filter, sub_type=None))]
end[}]
END[}] | Keyword[public] identifier[Filter] identifier[getDefaultFilter] operator[SEP] Keyword[final] identifier[String] identifier[filterString] operator[SEP] {
Keyword[return] Keyword[new] identifier[Filter] operator[SEP] operator[SEP] {
Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[1L] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[boolean] identifier[appliesToProperty] operator[SEP] identifier[Object] identifier[propertyId] operator[SEP] {
Keyword[for] operator[SEP] identifier[ColumnBean] identifier[col] operator[:] identifier[m_columns] operator[SEP] {
Keyword[if] operator[SEP] identifier[col] operator[SEP] identifier[getProperty] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[propertyId] operator[SEP] operator[&&] identifier[col] operator[SEP] identifier[getInfo] operator[SEP] operator[SEP] operator[SEP] identifier[filterable] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
}
Keyword[return] literal[boolean] operator[SEP]
} annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[boolean] identifier[passesFilter] operator[SEP] identifier[Object] identifier[itemId] , identifier[Item] identifier[item] operator[SEP] Keyword[throws] identifier[UnsupportedOperationException] {
Keyword[if] operator[SEP] identifier[CmsStringUtil] operator[SEP] identifier[isEmpty] operator[SEP] identifier[filterString] operator[SEP] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
identifier[T] identifier[bean] operator[=] operator[SEP] identifier[T] operator[SEP] identifier[itemId] operator[SEP] Keyword[for] operator[SEP] identifier[ColumnBean] identifier[col] operator[:] identifier[m_columns] operator[SEP] {
Keyword[if] operator[SEP] identifier[col] operator[SEP] identifier[getInfo] operator[SEP] operator[SEP] operator[SEP] identifier[filterable] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[SEP] literal[String] operator[+] identifier[item] operator[SEP] identifier[getItemProperty] operator[SEP] identifier[col] operator[SEP] identifier[getProperty] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[filterString] operator[SEP] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
}
}
Keyword[return] literal[boolean] operator[SEP]
}
} operator[SEP]
}
|
public final String encode(byte[] bytes, int off, int len) {
checkPositionIndexes(off, off + len, bytes.length);
StringBuilder result = new StringBuilder(maxEncodedSize(len));
try {
encodeTo(result, bytes, off, len);
} catch (IOException impossible) {
throw new AssertionError(impossible);
}
return result.toString();
} | class class_name[name] begin[{]
method[encode, return_type[type[String]], modifier[final public], parameter[bytes, off, len]] begin[{]
call[.checkPositionIndexes, parameter[member[.off], binary_operation[member[.off], +, member[.len]], member[bytes.length]]]
local_variable[type[StringBuilder], result]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encodeTo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=impossible, 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=AssertionError, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=impossible, types=['IOException']))], finally_block=None, label=None, resources=None)
return[call[result.toString, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[String] identifier[encode] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] {
identifier[checkPositionIndexes] operator[SEP] identifier[off] , identifier[off] operator[+] identifier[len] , identifier[bytes] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[result] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[maxEncodedSize] operator[SEP] identifier[len] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
identifier[encodeTo] operator[SEP] identifier[result] , identifier[bytes] , identifier[off] , identifier[len] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[IOException] identifier[impossible] operator[SEP] {
Keyword[throw] Keyword[new] identifier[AssertionError] operator[SEP] identifier[impossible] operator[SEP] operator[SEP]
}
Keyword[return] identifier[result] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP]
}
|
private void checkSendUpdateConfigMessage(String site1, String site2,
Status site1Status, Status site2Status) throws Exception {
String repo;
String revision;
String branch;
if(includeConfig) {
repo = site1Status.getConfigRepo();
revision = site1Status.getConfigRevision();
branch = site1Status.getConfigBranch();
if(!StringUtils.isEmptyOrNull(repo) && !StringUtils.isEmptyOrNull(revision) && !StringUtils.isEmptyOrNull(branch)) {
if(!repo.equals(site2Status.getConfigRepo()) || !revision.equals(site2Status.getConfigRevision()) || ! branch.equals(site2Status.getConfigBranch())) {
System.out.println("Sending update/config message to ["+site2+"]");
UpdateCommand.sendUpdateMessage(site2, repo, branch, revision, "Cloned config from ["+site1+"]: " + comment, token, UpdateConfigCommand.UPDATE_CONFIG_ENDPOINT, UpdateRequest.CONFIG_BRANCH_PREFIX);
} else {
System.out.println("Source [" + site1 + "] is on the same configuration repo, branch, and revision as the target [" + site2 + "].");
}
} else {
System.out.println("Configuration status not available from source site [" + site1 + "]");
}
}
} | class class_name[name] begin[{]
method[checkSendUpdateConfigMessage, return_type[void], modifier[private], parameter[site1, site2, site1Status, site2Status]] begin[{]
local_variable[type[String], repo]
local_variable[type[String], revision]
local_variable[type[String], branch]
if[member[.includeConfig]] begin[{]
assign[member[.repo], call[site1Status.getConfigRepo, parameter[]]]
assign[member[.revision], call[site1Status.getConfigRevision, parameter[]]]
assign[member[.branch], call[site1Status.getConfigBranch, parameter[]]]
if[binary_operation[binary_operation[call[StringUtils.isEmptyOrNull, parameter[member[.repo]]], &&, call[StringUtils.isEmptyOrNull, parameter[member[.revision]]]], &&, call[StringUtils.isEmptyOrNull, parameter[member[.branch]]]]] begin[{]
if[binary_operation[binary_operation[call[repo.equals, parameter[call[site2Status.getConfigRepo, parameter[]]]], ||, call[revision.equals, parameter[call[site2Status.getConfigRevision, parameter[]]]]], ||, call[branch.equals, parameter[call[site2Status.getConfigBranch, parameter[]]]]]] begin[{]
call[System.out.println, parameter[binary_operation[binary_operation[literal["Sending update/config message to ["], +, member[.site2]], +, literal["]"]]]]
call[UpdateCommand.sendUpdateMessage, parameter[member[.site2], member[.repo], member[.branch], member[.revision], binary_operation[binary_operation[binary_operation[literal["Cloned config from ["], +, member[.site1]], +, literal["]: "]], +, member[.comment]], member[.token], member[UpdateConfigCommand.UPDATE_CONFIG_ENDPOINT], member[UpdateRequest.CONFIG_BRANCH_PREFIX]]]
else begin[{]
call[System.out.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["Source ["], +, member[.site1]], +, literal["] is on the same configuration repo, branch, and revision as the target ["]], +, member[.site2]], +, literal["]."]]]]
end[}]
else begin[{]
call[System.out.println, parameter[binary_operation[binary_operation[literal["Configuration status not available from source site ["], +, member[.site1]], +, literal["]"]]]]
end[}]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[checkSendUpdateConfigMessage] operator[SEP] identifier[String] identifier[site1] , identifier[String] identifier[site2] , identifier[Status] identifier[site1Status] , identifier[Status] identifier[site2Status] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[String] identifier[repo] operator[SEP] identifier[String] identifier[revision] operator[SEP] identifier[String] identifier[branch] operator[SEP] Keyword[if] operator[SEP] identifier[includeConfig] operator[SEP] {
identifier[repo] operator[=] identifier[site1Status] operator[SEP] identifier[getConfigRepo] operator[SEP] operator[SEP] operator[SEP] identifier[revision] operator[=] identifier[site1Status] operator[SEP] identifier[getConfigRevision] operator[SEP] operator[SEP] operator[SEP] identifier[branch] operator[=] identifier[site1Status] operator[SEP] identifier[getConfigBranch] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[StringUtils] operator[SEP] identifier[isEmptyOrNull] operator[SEP] identifier[repo] operator[SEP] operator[&&] operator[!] identifier[StringUtils] operator[SEP] identifier[isEmptyOrNull] operator[SEP] identifier[revision] operator[SEP] operator[&&] operator[!] identifier[StringUtils] operator[SEP] identifier[isEmptyOrNull] operator[SEP] identifier[branch] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[repo] operator[SEP] identifier[equals] operator[SEP] identifier[site2Status] operator[SEP] identifier[getConfigRepo] operator[SEP] operator[SEP] operator[SEP] operator[||] operator[!] identifier[revision] operator[SEP] identifier[equals] operator[SEP] identifier[site2Status] operator[SEP] identifier[getConfigRevision] operator[SEP] operator[SEP] operator[SEP] operator[||] operator[!] identifier[branch] operator[SEP] identifier[equals] operator[SEP] identifier[site2Status] operator[SEP] identifier[getConfigBranch] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[site2] operator[+] literal[String] operator[SEP] operator[SEP] identifier[UpdateCommand] operator[SEP] identifier[sendUpdateMessage] operator[SEP] identifier[site2] , identifier[repo] , identifier[branch] , identifier[revision] , literal[String] operator[+] identifier[site1] operator[+] literal[String] operator[+] identifier[comment] , identifier[token] , identifier[UpdateConfigCommand] operator[SEP] identifier[UPDATE_CONFIG_ENDPOINT] , identifier[UpdateRequest] operator[SEP] identifier[CONFIG_BRANCH_PREFIX] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[site1] operator[+] literal[String] operator[+] identifier[site2] operator[+] literal[String] operator[SEP] operator[SEP]
}
}
Keyword[else] {
identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[site1] operator[+] literal[String] operator[SEP] operator[SEP]
}
}
}
|
@Override
public final Buffer readUntil(final int maxBytes, final byte... bytes) throws IOException, ByteNotFoundException,
IllegalArgumentException {
final Buffer result = readUntilSafe(maxBytes, bytes);
if (result == null) {
throw new ByteNotFoundException(bytes);
}
return result;
} | class class_name[name] begin[{]
method[readUntil, return_type[type[Buffer]], modifier[final public], parameter[maxBytes, bytes]] begin[{]
local_variable[type[Buffer], result]
if[binary_operation[member[.result], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=bytes, 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=ByteNotFoundException, sub_type=None)), label=None)
else begin[{]
None
end[}]
return[member[.result]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[Buffer] identifier[readUntil] operator[SEP] Keyword[final] Keyword[int] identifier[maxBytes] , Keyword[final] Keyword[byte] operator[...] identifier[bytes] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ByteNotFoundException] , identifier[IllegalArgumentException] {
Keyword[final] identifier[Buffer] identifier[result] operator[=] identifier[readUntilSafe] operator[SEP] identifier[maxBytes] , identifier[bytes] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[ByteNotFoundException] operator[SEP] identifier[bytes] operator[SEP] operator[SEP]
}
Keyword[return] identifier[result] operator[SEP]
}
|
protected void processImageTag(ImageTag tag) {
processLink(tag, ATTRIBUTE_SRC, CmsRelationType.valueOf(tag.getTagName()));
} | class class_name[name] begin[{]
method[processImageTag, return_type[void], modifier[protected], parameter[tag]] begin[{]
call[.processLink, parameter[member[.tag], member[.ATTRIBUTE_SRC], call[CmsRelationType.valueOf, parameter[call[tag.getTagName, parameter[]]]]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[processImageTag] operator[SEP] identifier[ImageTag] identifier[tag] operator[SEP] {
identifier[processLink] operator[SEP] identifier[tag] , identifier[ATTRIBUTE_SRC] , identifier[CmsRelationType] operator[SEP] identifier[valueOf] operator[SEP] identifier[tag] operator[SEP] identifier[getTagName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
|
public static String getServerHost() {
String ret = getLatkeProperty("serverHost");
if (null == ret) {
final RequestContext requestContext = REQUEST_CONTEXT.get();
if (null != requestContext) {
ret = requestContext.getRequest().getServerName();
} else {
initPublicIP();
return PUBLIC_IP;
}
}
return ret;
} | class class_name[name] begin[{]
method[getServerHost, return_type[type[String]], modifier[public static], parameter[]] begin[{]
local_variable[type[String], ret]
if[binary_operation[literal[null], ==, member[.ret]]] begin[{]
local_variable[type[RequestContext], requestContext]
if[binary_operation[literal[null], !=, member[.requestContext]]] begin[{]
assign[member[.ret], call[requestContext.getRequest, parameter[]]]
else begin[{]
call[.initPublicIP, parameter[]]
return[member[.PUBLIC_IP]]
end[}]
else begin[{]
None
end[}]
return[member[.ret]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[getServerHost] operator[SEP] operator[SEP] {
identifier[String] identifier[ret] operator[=] identifier[getLatkeProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[ret] operator[SEP] {
Keyword[final] identifier[RequestContext] identifier[requestContext] operator[=] identifier[REQUEST_CONTEXT] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[requestContext] operator[SEP] {
identifier[ret] operator[=] identifier[requestContext] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] identifier[getServerName] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[initPublicIP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[PUBLIC_IP] operator[SEP]
}
}
Keyword[return] identifier[ret] operator[SEP]
}
|
protected void adjustContentSize() {
if (m_isFrame && m_isShowing) {
if (m_buttonPanel != null) {
m_contentPanel.getElement().getStyle().setBottom(m_buttonPanel.getOffsetHeight() + 6, Unit.PX);
} else {
m_contentPanel.getElement().getStyle().clearBottom();
}
}
} | class class_name[name] begin[{]
method[adjustContentSize, return_type[void], modifier[protected], parameter[]] begin[{]
if[binary_operation[member[.m_isFrame], &&, member[.m_isShowing]]] begin[{]
if[binary_operation[member[.m_buttonPanel], !=, literal[null]]] begin[{]
call[m_contentPanel.getElement, parameter[]]
else begin[{]
call[m_contentPanel.getElement, parameter[]]
end[}]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[adjustContentSize] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_isFrame] operator[&&] identifier[m_isShowing] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_buttonPanel] operator[!=] Other[null] operator[SEP] {
identifier[m_contentPanel] operator[SEP] identifier[getElement] operator[SEP] operator[SEP] operator[SEP] identifier[getStyle] operator[SEP] operator[SEP] operator[SEP] identifier[setBottom] operator[SEP] identifier[m_buttonPanel] operator[SEP] identifier[getOffsetHeight] operator[SEP] operator[SEP] operator[+] Other[6] , identifier[Unit] operator[SEP] identifier[PX] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[m_contentPanel] operator[SEP] identifier[getElement] operator[SEP] operator[SEP] operator[SEP] identifier[getStyle] operator[SEP] operator[SEP] operator[SEP] identifier[clearBottom] operator[SEP] operator[SEP] operator[SEP]
}
}
}
|
@Override
public void set(final PreparedStatement st, final int index, final BigDecimal value, final int dbSqlType) throws SQLException {
st.setBigDecimal(index, value);
} | class class_name[name] begin[{]
method[set, return_type[void], modifier[public], parameter[st, index, value, dbSqlType]] begin[{]
call[st.setBigDecimal, parameter[member[.index], member[.value]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[set] operator[SEP] Keyword[final] identifier[PreparedStatement] identifier[st] , Keyword[final] Keyword[int] identifier[index] , Keyword[final] identifier[BigDecimal] identifier[value] , Keyword[final] Keyword[int] identifier[dbSqlType] operator[SEP] Keyword[throws] identifier[SQLException] {
identifier[st] operator[SEP] identifier[setBigDecimal] operator[SEP] identifier[index] , identifier[value] operator[SEP] operator[SEP]
}
|
@Override
public CPDefinitionSpecificationOptionValue fetchByC_CSO_Last(
long CPDefinitionId, long CPSpecificationOptionId,
OrderByComparator<CPDefinitionSpecificationOptionValue> orderByComparator) {
int count = countByC_CSO(CPDefinitionId, CPSpecificationOptionId);
if (count == 0) {
return null;
}
List<CPDefinitionSpecificationOptionValue> list = findByC_CSO(CPDefinitionId,
CPSpecificationOptionId, count - 1, count, orderByComparator);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
} | class class_name[name] begin[{]
method[fetchByC_CSO_Last, return_type[type[CPDefinitionSpecificationOptionValue]], modifier[public], parameter[CPDefinitionId, CPSpecificationOptionId, orderByComparator]] begin[{]
local_variable[type[int], count]
if[binary_operation[member[.count], ==, literal[0]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[List], list]
if[call[list.isEmpty, parameter[]]] begin[{]
return[call[list.get, parameter[literal[0]]]]
else begin[{]
None
end[}]
return[literal[null]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[CPDefinitionSpecificationOptionValue] identifier[fetchByC_CSO_Last] operator[SEP] Keyword[long] identifier[CPDefinitionId] , Keyword[long] identifier[CPSpecificationOptionId] , identifier[OrderByComparator] operator[<] identifier[CPDefinitionSpecificationOptionValue] operator[>] identifier[orderByComparator] operator[SEP] {
Keyword[int] identifier[count] operator[=] identifier[countByC_CSO] operator[SEP] identifier[CPDefinitionId] , identifier[CPSpecificationOptionId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[count] operator[==] Other[0] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
identifier[List] operator[<] identifier[CPDefinitionSpecificationOptionValue] operator[>] identifier[list] operator[=] identifier[findByC_CSO] operator[SEP] identifier[CPDefinitionId] , identifier[CPSpecificationOptionId] , identifier[count] operator[-] Other[1] , identifier[count] , identifier[orderByComparator] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[list] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[list] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP]
}
Keyword[return] Other[null] operator[SEP]
}
|
public void deselectByIndex(int index) {
getDispatcher().beforeDeselect(this, index);
new Select(getElement()).deselectByIndex(index);
if (Config.getBoolConfigProperty(ConfigProperty.ENABLE_GUI_LOGGING)) {
logUIActions(UIActions.CLEARED, Integer.toString(index));
}
getDispatcher().afterDeselect(this, index);
} | class class_name[name] begin[{]
method[deselectByIndex, return_type[void], modifier[public], parameter[index]] begin[{]
call[.getDispatcher, parameter[]]
ClassCreator(arguments=[MethodInvocation(arguments=[], member=getElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deselectByIndex, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Select, sub_type=None))
if[call[Config.getBoolConfigProperty, parameter[member[ConfigProperty.ENABLE_GUI_LOGGING]]]] begin[{]
call[.logUIActions, parameter[member[UIActions.CLEARED], call[Integer.toString, parameter[member[.index]]]]]
else begin[{]
None
end[}]
call[.getDispatcher, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[deselectByIndex] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
identifier[getDispatcher] operator[SEP] operator[SEP] operator[SEP] identifier[beforeDeselect] operator[SEP] Keyword[this] , identifier[index] operator[SEP] operator[SEP] Keyword[new] identifier[Select] operator[SEP] identifier[getElement] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[deselectByIndex] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Config] operator[SEP] identifier[getBoolConfigProperty] operator[SEP] identifier[ConfigProperty] operator[SEP] identifier[ENABLE_GUI_LOGGING] operator[SEP] operator[SEP] {
identifier[logUIActions] operator[SEP] identifier[UIActions] operator[SEP] identifier[CLEARED] , identifier[Integer] operator[SEP] identifier[toString] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP]
}
identifier[getDispatcher] operator[SEP] operator[SEP] operator[SEP] identifier[afterDeselect] operator[SEP] Keyword[this] , identifier[index] operator[SEP] operator[SEP]
}
|
public ResultSet getPseudoColumns(final String catalog,
final String schemaPattern,
final String tableNamePattern,
final String columnNamePattern)
throws SQLException {
return RowLists.rowList8(String.class, String.class, String.class,
String.class, String.class, String.class,
String.class, String.class).
withLabel(1, "TABLE_CAT").
withLabel(2, "TABLE_SCHEM").
withLabel(3, "TABLE_NAME").
withLabel(4, "COLUMN_NAME").
withLabel(5, "GRANTOR").
withLabel(6, "GRANTEE").
withLabel(7, "PRIVILEGE").
withLabel(8, "IS_GRANTABLE").
resultSet();
} | class class_name[name] begin[{]
method[getPseudoColumns, return_type[type[ResultSet]], modifier[public], parameter[catalog, schemaPattern, tableNamePattern, columnNamePattern]] begin[{]
return[call[RowLists.rowList8, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]]]
end[}]
END[}] | Keyword[public] identifier[ResultSet] identifier[getPseudoColumns] operator[SEP] Keyword[final] identifier[String] identifier[catalog] , Keyword[final] identifier[String] identifier[schemaPattern] , Keyword[final] identifier[String] identifier[tableNamePattern] , Keyword[final] identifier[String] identifier[columnNamePattern] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[return] identifier[RowLists] operator[SEP] identifier[rowList8] operator[SEP] identifier[String] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[1] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[2] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[3] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[4] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[5] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[6] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[7] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[8] , literal[String] operator[SEP] operator[SEP] identifier[resultSet] operator[SEP] operator[SEP] operator[SEP]
}
|
@Override
public ValidateSecurityProfileBehaviorsResult validateSecurityProfileBehaviors(ValidateSecurityProfileBehaviorsRequest request) {
request = beforeClientExecution(request);
return executeValidateSecurityProfileBehaviors(request);
} | class class_name[name] begin[{]
method[validateSecurityProfileBehaviors, return_type[type[ValidateSecurityProfileBehaviorsResult]], modifier[public], parameter[request]] begin[{]
assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]]
return[call[.executeValidateSecurityProfileBehaviors, parameter[member[.request]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[ValidateSecurityProfileBehaviorsResult] identifier[validateSecurityProfileBehaviors] operator[SEP] identifier[ValidateSecurityProfileBehaviorsRequest] identifier[request] operator[SEP] {
identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeValidateSecurityProfileBehaviors] operator[SEP] identifier[request] operator[SEP] operator[SEP]
}
|
public final void mRIGHT_SQUARE() throws RecognitionException {
try {
int _type = RIGHT_SQUARE;
int _channel = DEFAULT_TOKEN_CHANNEL;
// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:301:9: ( ']' )
// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:301:11: ']'
{
match(']'); if (state.failed) return;
}
state.type = _type;
state.channel = _channel;
}
finally {
// do for sure before leaving
}
} | class class_name[name] begin[{]
method[mRIGHT_SQUARE, return_type[void], modifier[final public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=RIGHT_SQUARE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_type)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=DEFAULT_TOKEN_CHANNEL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_channel)], modifiers=set(), type=BasicType(dimensions=[], name=int)), BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=']')], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), StatementExpression(expression=Assignment(expressionl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], catches=None, finally_block=[], label=None, resources=None)
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[void] identifier[mRIGHT_SQUARE] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] {
Keyword[try] {
Keyword[int] identifier[_type] operator[=] identifier[RIGHT_SQUARE] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TOKEN_CHANNEL] operator[SEP] {
identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP]
}
identifier[state] operator[SEP] identifier[type] operator[=] identifier[_type] operator[SEP] identifier[state] operator[SEP] identifier[channel] operator[=] identifier[_channel] operator[SEP]
}
Keyword[finally] {
}
}
|
public void strokeRectangle(Rectangle rect, Color color, float linewidth) {
strokeRectangle(rect, color, linewidth, null);
} | class class_name[name] begin[{]
method[strokeRectangle, return_type[void], modifier[public], parameter[rect, color, linewidth]] begin[{]
call[.strokeRectangle, parameter[member[.rect], member[.color], member[.linewidth], literal[null]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[strokeRectangle] operator[SEP] identifier[Rectangle] identifier[rect] , identifier[Color] identifier[color] , Keyword[float] identifier[linewidth] operator[SEP] {
identifier[strokeRectangle] operator[SEP] identifier[rect] , identifier[color] , identifier[linewidth] , Other[null] operator[SEP] operator[SEP]
}
|
public void addOption(Setter setter, Option o) {
checkNonNull(setter, "Setter");
checkNonNull(o, "Option");
checkOptionNotInMap(o.name());
for (String alias : o.aliases()) {
checkOptionNotInMap(alias);
}
options.add(createOptionHandler(new NamedOptionDef(o), setter));
} | class class_name[name] begin[{]
method[addOption, return_type[void], modifier[public], parameter[setter, o]] begin[{]
call[.checkNonNull, parameter[member[.setter], literal["Setter"]]]
call[.checkNonNull, parameter[member[.o], literal["Option"]]]
call[.checkOptionNotInMap, parameter[call[o.name, parameter[]]]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=alias, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkOptionNotInMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=aliases, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=alias)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)
call[options.add, parameter[call[.createOptionHandler, parameter[ClassCreator(arguments=[MemberReference(member=o, 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=NamedOptionDef, sub_type=None)), member[.setter]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[addOption] operator[SEP] identifier[Setter] identifier[setter] , identifier[Option] identifier[o] operator[SEP] {
identifier[checkNonNull] operator[SEP] identifier[setter] , literal[String] operator[SEP] operator[SEP] identifier[checkNonNull] operator[SEP] identifier[o] , literal[String] operator[SEP] operator[SEP] identifier[checkOptionNotInMap] operator[SEP] identifier[o] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[alias] operator[:] identifier[o] operator[SEP] identifier[aliases] operator[SEP] operator[SEP] operator[SEP] {
identifier[checkOptionNotInMap] operator[SEP] identifier[alias] operator[SEP] operator[SEP]
}
identifier[options] operator[SEP] identifier[add] operator[SEP] identifier[createOptionHandler] operator[SEP] Keyword[new] identifier[NamedOptionDef] operator[SEP] identifier[o] operator[SEP] , identifier[setter] operator[SEP] operator[SEP] operator[SEP]
}
|
public static boolean createFile(File targetFile) {
if (targetFile.exists()) {
if (targetFile.isFile()) return true;
delFileOrFolder(targetFile);
}
try {
return targetFile.createNewFile();
} catch (IOException e) {
return false;
}
} | class class_name[name] begin[{]
method[createFile, return_type[type[boolean]], modifier[public static], parameter[targetFile]] begin[{]
if[call[targetFile.exists, parameter[]]] begin[{]
if[call[targetFile.isFile, parameter[]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
call[.delFileOrFolder, parameter[member[.targetFile]]]
else begin[{]
None
end[}]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=createNewFile, postfix_operators=[], prefix_operators=[], qualifier=targetFile, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None)
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[boolean] identifier[createFile] operator[SEP] identifier[File] identifier[targetFile] operator[SEP] {
Keyword[if] operator[SEP] identifier[targetFile] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[targetFile] operator[SEP] identifier[isFile] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[delFileOrFolder] operator[SEP] identifier[targetFile] operator[SEP] operator[SEP]
}
Keyword[try] {
Keyword[return] identifier[targetFile] operator[SEP] identifier[createNewFile] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
}
|
static byte[] shortToBytes(short value) {
byte[] bytes = new byte[2];
if (PlatformDependent.BIG_ENDIAN_NATIVE_ORDER) {
bytes[1] = (byte) ((value >> 8) & 0xff);
bytes[0] = (byte) (value & 0xff);
} else {
bytes[0] = (byte) ((value >> 8) & 0xff);
bytes[1] = (byte) (value & 0xff);
}
return bytes;
} | class class_name[name] begin[{]
method[shortToBytes, return_type[type[byte]], modifier[static], parameter[value]] begin[{]
local_variable[type[byte], bytes]
if[member[PlatformDependent.BIG_ENDIAN_NATIVE_ORDER]] begin[{]
assign[member[.bytes], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=byte))]
assign[member[.bytes], Cast(expression=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=byte))]
else begin[{]
assign[member[.bytes], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=byte))]
assign[member[.bytes], Cast(expression=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=byte))]
end[}]
return[member[.bytes]]
end[}]
END[}] | Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[shortToBytes] operator[SEP] Keyword[short] identifier[value] operator[SEP] {
Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[PlatformDependent] operator[SEP] identifier[BIG_ENDIAN_NATIVE_ORDER] operator[SEP] {
identifier[bytes] operator[SEP] Other[1] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[>] operator[>] Other[8] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] Other[0] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[value] operator[&] literal[Integer] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[bytes] operator[SEP] Other[0] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[>] operator[>] Other[8] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] Other[1] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[value] operator[&] literal[Integer] operator[SEP] operator[SEP]
}
Keyword[return] identifier[bytes] operator[SEP]
}
|
public void dump(final PrintStream ps) {
String str =
"Reported error: \"" + message + "\"";
if (lineNumber != -1) {
str += " at line " + lineNumber + " column " + colNumber;
}
ps.println(str);
if (exception != null) {
exception.printStackTrace(ps);
}
} | class class_name[name] begin[{]
method[dump, return_type[void], modifier[public], parameter[ps]] begin[{]
local_variable[type[String], str]
if[binary_operation[member[.lineNumber], !=, literal[1]]] begin[{]
assign[member[.str], binary_operation[binary_operation[binary_operation[literal[" at line "], +, member[.lineNumber]], +, literal[" column "]], +, member[.colNumber]]]
else begin[{]
None
end[}]
call[ps.println, parameter[member[.str]]]
if[binary_operation[member[.exception], !=, literal[null]]] begin[{]
call[exception.printStackTrace, parameter[member[.ps]]]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[dump] operator[SEP] Keyword[final] identifier[PrintStream] identifier[ps] operator[SEP] {
identifier[String] identifier[str] operator[=] literal[String] operator[+] identifier[message] operator[+] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[lineNumber] operator[!=] operator[-] Other[1] operator[SEP] {
identifier[str] operator[+=] literal[String] operator[+] identifier[lineNumber] operator[+] literal[String] operator[+] identifier[colNumber] operator[SEP]
}
identifier[ps] operator[SEP] identifier[println] operator[SEP] identifier[str] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[exception] operator[!=] Other[null] operator[SEP] {
identifier[exception] operator[SEP] identifier[printStackTrace] operator[SEP] identifier[ps] operator[SEP] operator[SEP]
}
}
|
public void setEntity_attributes(FSArray v) {
if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_entity_attributes == null)
jcasType.jcas.throwFeatMissing("entity_attributes", "de.julielab.jules.types.ace.Entity");
jcasType.ll_cas.ll_setRefValue(addr, ((Entity_Type)jcasType).casFeatCode_entity_attributes, jcasType.ll_cas.ll_getFSRef(v));} | class class_name[name] begin[{]
method[setEntity_attributes, return_type[void], modifier[public], parameter[v]] begin[{]
if[binary_operation[member[Entity_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Entity_Type, sub_type=None)), ==, literal[null]]]] begin[{]
call[jcasType.jcas.throwFeatMissing, parameter[literal["entity_attributes"], literal["de.julielab.jules.types.ace.Entity"]]]
else begin[{]
None
end[}]
call[jcasType.ll_cas.ll_setRefValue, parameter[member[.addr], Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Entity_Type, sub_type=None)), call[jcasType.ll_cas.ll_getFSRef, parameter[member[.v]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setEntity_attributes] operator[SEP] identifier[FSArray] identifier[v] operator[SEP] {
Keyword[if] operator[SEP] identifier[Entity_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[Entity_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeat_entity_attributes] operator[==] Other[null] operator[SEP] identifier[jcasType] operator[SEP] identifier[jcas] operator[SEP] identifier[throwFeatMissing] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_setRefValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[Entity_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_entity_attributes] , identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getFSRef] operator[SEP] identifier[v] operator[SEP] operator[SEP] operator[SEP]
}
|
public boolean previousPath() {
// pre-decrement
if (m_nextPathIndex == 0)
return false;
m_nextPathIndex--;
m_currentSegmentIndex = -1;
m_nextSegmentIndex = 0;
m_segmentCount = _getSegmentCount(m_nextPathIndex);
m_currentPathIndex = m_nextPathIndex;
m_pathBegin = m_parent.getPathStart(m_currentPathIndex);
resetToLastSegment();
return true;
} | class class_name[name] begin[{]
method[previousPath, return_type[type[boolean]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.m_nextPathIndex], ==, literal[0]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
member[.m_nextPathIndex]
assign[member[.m_currentSegmentIndex], literal[1]]
assign[member[.m_nextSegmentIndex], literal[0]]
assign[member[.m_segmentCount], call[._getSegmentCount, parameter[member[.m_nextPathIndex]]]]
assign[member[.m_currentPathIndex], member[.m_nextPathIndex]]
assign[member[.m_pathBegin], call[m_parent.getPathStart, parameter[member[.m_currentPathIndex]]]]
call[.resetToLastSegment, parameter[]]
return[literal[true]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[previousPath] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_nextPathIndex] operator[==] Other[0] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[m_nextPathIndex] operator[--] operator[SEP] identifier[m_currentSegmentIndex] operator[=] operator[-] Other[1] operator[SEP] identifier[m_nextSegmentIndex] operator[=] Other[0] operator[SEP] identifier[m_segmentCount] operator[=] identifier[_getSegmentCount] operator[SEP] identifier[m_nextPathIndex] operator[SEP] operator[SEP] identifier[m_currentPathIndex] operator[=] identifier[m_nextPathIndex] operator[SEP] identifier[m_pathBegin] operator[=] identifier[m_parent] operator[SEP] identifier[getPathStart] operator[SEP] identifier[m_currentPathIndex] operator[SEP] operator[SEP] identifier[resetToLastSegment] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP]
}
|
public PExp caseABooleanPattern(ABooleanPattern node)
throws AnalysisException
{
ABooleanConstExp b = new ABooleanConstExp();
b.setValue(node.getValue().clone());
addPossibleType(b, node);
return b;
} | class class_name[name] begin[{]
method[caseABooleanPattern, return_type[type[PExp]], modifier[public], parameter[node]] begin[{]
local_variable[type[ABooleanConstExp], b]
call[b.setValue, parameter[call[node.getValue, parameter[]]]]
call[.addPossibleType, parameter[member[.b], member[.node]]]
return[member[.b]]
end[}]
END[}] | Keyword[public] identifier[PExp] identifier[caseABooleanPattern] operator[SEP] identifier[ABooleanPattern] identifier[node] operator[SEP] Keyword[throws] identifier[AnalysisException] {
identifier[ABooleanConstExp] identifier[b] operator[=] Keyword[new] identifier[ABooleanConstExp] operator[SEP] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[setValue] operator[SEP] identifier[node] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addPossibleType] operator[SEP] identifier[b] , identifier[node] operator[SEP] operator[SEP] Keyword[return] identifier[b] operator[SEP]
}
|
private void append(final byte[] next_qualifier, final byte[] next_value) {
ensureCapacity(next_qualifier, next_value);
// Now let's simply concatenate all the values together.
System.arraycopy(next_value, 0, batched_value, value_index, next_value.length);
value_index += next_value.length;
// Now let's concatenate all the qualifiers together.
System.arraycopy(next_qualifier, 0, batched_qualifier, qualifier_index,
next_qualifier.length);
qualifier_index += next_qualifier.length;
} | class class_name[name] begin[{]
method[append, return_type[void], modifier[private], parameter[next_qualifier, next_value]] begin[{]
call[.ensureCapacity, parameter[member[.next_qualifier], member[.next_value]]]
call[System.arraycopy, parameter[member[.next_value], literal[0], member[.batched_value], member[.value_index], member[next_value.length]]]
assign[member[.value_index], member[next_value.length]]
call[System.arraycopy, parameter[member[.next_qualifier], literal[0], member[.batched_qualifier], member[.qualifier_index], member[next_qualifier.length]]]
assign[member[.qualifier_index], member[next_qualifier.length]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[append] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[next_qualifier] , Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[next_value] operator[SEP] {
identifier[ensureCapacity] operator[SEP] identifier[next_qualifier] , identifier[next_value] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[next_value] , Other[0] , identifier[batched_value] , identifier[value_index] , identifier[next_value] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[value_index] operator[+=] identifier[next_value] operator[SEP] identifier[length] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[next_qualifier] , Other[0] , identifier[batched_qualifier] , identifier[qualifier_index] , identifier[next_qualifier] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[qualifier_index] operator[+=] identifier[next_qualifier] operator[SEP] identifier[length] operator[SEP]
}
|
public void marshall(MetricDatapoint metricDatapoint, ProtocolMarshaller protocolMarshaller) {
if (metricDatapoint == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(metricDatapoint.getAverage(), AVERAGE_BINDING);
protocolMarshaller.marshall(metricDatapoint.getMaximum(), MAXIMUM_BINDING);
protocolMarshaller.marshall(metricDatapoint.getMinimum(), MINIMUM_BINDING);
protocolMarshaller.marshall(metricDatapoint.getSampleCount(), SAMPLECOUNT_BINDING);
protocolMarshaller.marshall(metricDatapoint.getSum(), SUM_BINDING);
protocolMarshaller.marshall(metricDatapoint.getTimestamp(), TIMESTAMP_BINDING);
protocolMarshaller.marshall(metricDatapoint.getUnit(), UNIT_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
} | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[metricDatapoint, protocolMarshaller]] begin[{]
if[binary_operation[member[.metricDatapoint], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)
else begin[{]
None
end[}]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAverage, postfix_operators=[], prefix_operators=[], qualifier=metricDatapoint, selectors=[], type_arguments=None), MemberReference(member=AVERAGE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMaximum, postfix_operators=[], prefix_operators=[], qualifier=metricDatapoint, selectors=[], type_arguments=None), MemberReference(member=MAXIMUM_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMinimum, postfix_operators=[], prefix_operators=[], qualifier=metricDatapoint, selectors=[], type_arguments=None), MemberReference(member=MINIMUM_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSampleCount, postfix_operators=[], prefix_operators=[], qualifier=metricDatapoint, selectors=[], type_arguments=None), MemberReference(member=SAMPLECOUNT_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSum, postfix_operators=[], prefix_operators=[], qualifier=metricDatapoint, selectors=[], type_arguments=None), MemberReference(member=SUM_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTimestamp, postfix_operators=[], prefix_operators=[], qualifier=metricDatapoint, selectors=[], type_arguments=None), MemberReference(member=TIMESTAMP_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getUnit, postfix_operators=[], prefix_operators=[], qualifier=metricDatapoint, selectors=[], type_arguments=None), MemberReference(member=UNIT_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)
end[}]
END[}] | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[MetricDatapoint] identifier[metricDatapoint] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[metricDatapoint] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[try] {
identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[metricDatapoint] operator[SEP] identifier[getAverage] operator[SEP] operator[SEP] , identifier[AVERAGE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[metricDatapoint] operator[SEP] identifier[getMaximum] operator[SEP] operator[SEP] , identifier[MAXIMUM_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[metricDatapoint] operator[SEP] identifier[getMinimum] operator[SEP] operator[SEP] , identifier[MINIMUM_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[metricDatapoint] operator[SEP] identifier[getSampleCount] operator[SEP] operator[SEP] , identifier[SAMPLECOUNT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[metricDatapoint] operator[SEP] identifier[getSum] operator[SEP] operator[SEP] , identifier[SUM_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[metricDatapoint] operator[SEP] identifier[getTimestamp] operator[SEP] operator[SEP] , identifier[TIMESTAMP_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[metricDatapoint] operator[SEP] identifier[getUnit] operator[SEP] operator[SEP] , identifier[UNIT_BINDING] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] {
Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP]
}
}
|
public static Optional<ExecutableElement> override(
DeclaredType type, Types types, String methodName, TypeMirror... params) {
return override(asElement(type), types, methodName, params);
} | class class_name[name] begin[{]
method[override, return_type[type[Optional]], modifier[public static], parameter[type, types, methodName, params]] begin[{]
return[call[.override, parameter[call[.asElement, parameter[member[.type]]], member[.types], member[.methodName], member[.params]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Optional] operator[<] identifier[ExecutableElement] operator[>] identifier[override] operator[SEP] identifier[DeclaredType] identifier[type] , identifier[Types] identifier[types] , identifier[String] identifier[methodName] , identifier[TypeMirror] operator[...] identifier[params] operator[SEP] {
Keyword[return] identifier[override] operator[SEP] identifier[asElement] operator[SEP] identifier[type] operator[SEP] , identifier[types] , identifier[methodName] , identifier[params] operator[SEP] operator[SEP]
}
|
@Override
public EClass getIfcDamperType() {
if (ifcDamperTypeEClass == null) {
ifcDamperTypeEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI).getEClassifiers()
.get(170);
}
return ifcDamperTypeEClass;
} | class class_name[name] begin[{]
method[getIfcDamperType, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcDamperTypeEClass], ==, literal[null]]] begin[{]
assign[member[.ifcDamperTypeEClass], 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=170)], 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[.ifcDamperTypeEClass]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcDamperType] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcDamperTypeEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcDamperTypeEClass] 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[170] operator[SEP] operator[SEP]
}
Keyword[return] identifier[ifcDamperTypeEClass] operator[SEP]
}
|
@Override
public final void start(final Collection<? extends Location> locations) {
if (DynamicTasks.getTaskQueuingContext() != null) {
doStart(locations);
} else {
Task<?> task = Tasks.builder().name("start (sequential)").body(new Runnable() {
public void run() {
doStart(locations);
}
}).build();
Entities.submit(this, task).getUnchecked();
}
} | class class_name[name] begin[{]
method[start, return_type[void], modifier[final public], parameter[locations]] begin[{]
if[binary_operation[call[DynamicTasks.getTaskQueuingContext, parameter[]], !=, literal[null]]] begin[{]
call[.doStart, parameter[member[.locations]]]
else begin[{]
local_variable[type[Task], task]
call[Entities.submit, parameter[THIS[], member[.task]]]
end[}]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[start] operator[SEP] Keyword[final] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[Location] operator[>] identifier[locations] operator[SEP] {
Keyword[if] operator[SEP] identifier[DynamicTasks] operator[SEP] identifier[getTaskQueuingContext] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] {
identifier[doStart] operator[SEP] identifier[locations] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[Task] operator[<] operator[?] operator[>] identifier[task] operator[=] identifier[Tasks] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[body] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] {
Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] {
identifier[doStart] operator[SEP] identifier[locations] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[Entities] operator[SEP] identifier[submit] operator[SEP] Keyword[this] , identifier[task] operator[SEP] operator[SEP] identifier[getUnchecked] operator[SEP] operator[SEP] operator[SEP]
}
}
|
public EnumT createAndRegister(String constant) {
EnumT instance = constructor.apply(constant);
knownValues.put(constant, instance);
return instance;
} | class class_name[name] begin[{]
method[createAndRegister, return_type[type[EnumT]], modifier[public], parameter[constant]] begin[{]
local_variable[type[EnumT], instance]
call[knownValues.put, parameter[member[.constant], member[.instance]]]
return[member[.instance]]
end[}]
END[}] | Keyword[public] identifier[EnumT] identifier[createAndRegister] operator[SEP] identifier[String] identifier[constant] operator[SEP] {
identifier[EnumT] identifier[instance] operator[=] identifier[constructor] operator[SEP] identifier[apply] operator[SEP] identifier[constant] operator[SEP] operator[SEP] identifier[knownValues] operator[SEP] identifier[put] operator[SEP] identifier[constant] , identifier[instance] operator[SEP] operator[SEP] Keyword[return] identifier[instance] operator[SEP]
}
|
public MethodDef[] getMethodDefs(InputSource methodMapSource)
throws ObjectIntegrityException, RepositoryConfigurationException,
GeneralException {
Mmap methodMap = getMethodMap(methodMapSource);
return methodMap.mmapMethods;
} | class class_name[name] begin[{]
method[getMethodDefs, return_type[type[MethodDef]], modifier[public], parameter[methodMapSource]] begin[{]
local_variable[type[Mmap], methodMap]
return[member[methodMap.mmapMethods]]
end[}]
END[}] | Keyword[public] identifier[MethodDef] operator[SEP] operator[SEP] identifier[getMethodDefs] operator[SEP] identifier[InputSource] identifier[methodMapSource] operator[SEP] Keyword[throws] identifier[ObjectIntegrityException] , identifier[RepositoryConfigurationException] , identifier[GeneralException] {
identifier[Mmap] identifier[methodMap] operator[=] identifier[getMethodMap] operator[SEP] identifier[methodMapSource] operator[SEP] operator[SEP] Keyword[return] identifier[methodMap] operator[SEP] identifier[mmapMethods] operator[SEP]
}
|
public Graph<Node> dependenceGraph() {
Graph.Builder<Node> builder = new Graph.Builder<>();
archives().stream()
.map(analyzer.results::get)
.filter(deps -> !deps.dependencies().isEmpty())
.flatMap(deps -> deps.dependencies().stream())
.forEach(d -> addEdge(builder, d));
return builder.build();
} | class class_name[name] begin[{]
method[dependenceGraph, return_type[type[Graph]], modifier[public], parameter[]] begin[{]
local_variable[type[Graph], builder]
call[.archives, parameter[]]
return[call[builder.build, parameter[]]]
end[}]
END[}] | Keyword[public] identifier[Graph] operator[<] identifier[Node] operator[>] identifier[dependenceGraph] operator[SEP] operator[SEP] {
identifier[Graph] operator[SEP] identifier[Builder] operator[<] identifier[Node] operator[>] identifier[builder] operator[=] Keyword[new] identifier[Graph] operator[SEP] identifier[Builder] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[archives] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[analyzer] operator[SEP] identifier[results] operator[::] identifier[get] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[deps] operator[->] operator[!] identifier[deps] operator[SEP] identifier[dependencies] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] identifier[deps] operator[->] identifier[deps] operator[SEP] identifier[dependencies] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identifier[d] operator[->] identifier[addEdge] operator[SEP] identifier[builder] , identifier[d] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP]
}
|
public static br_device_profile[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception
{
br_device_profile obj = new br_device_profile();
options option = new options();
option.set_filter(filter);
br_device_profile[] response = (br_device_profile[]) obj.getfiltered(service, option);
return response;
} | class class_name[name] begin[{]
method[get_filtered, return_type[type[br_device_profile]], modifier[public static], parameter[service, filter]] begin[{]
local_variable[type[br_device_profile], obj]
local_variable[type[options], option]
call[option.set_filter, parameter[member[.filter]]]
local_variable[type[br_device_profile], response]
return[member[.response]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[br_device_profile] operator[SEP] operator[SEP] identifier[get_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[filtervalue] operator[SEP] operator[SEP] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[br_device_profile] identifier[obj] operator[=] Keyword[new] identifier[br_device_profile] operator[SEP] operator[SEP] operator[SEP] identifier[options] identifier[option] operator[=] Keyword[new] identifier[options] operator[SEP] operator[SEP] operator[SEP] identifier[option] operator[SEP] identifier[set_filter] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[br_device_profile] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[br_device_profile] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[getfiltered] operator[SEP] identifier[service] , identifier[option] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP]
}
|
private void showFolderAlbumFiles(int position) {
this.mCurrentFolder = position;
AlbumFolder albumFolder = mAlbumFolders.get(position);
mView.bindAlbumFolder(albumFolder);
} | class class_name[name] begin[{]
method[showFolderAlbumFiles, return_type[void], modifier[private], parameter[position]] begin[{]
assign[THIS[member[None.mCurrentFolder]], member[.position]]
local_variable[type[AlbumFolder], albumFolder]
call[mView.bindAlbumFolder, parameter[member[.albumFolder]]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[showFolderAlbumFiles] operator[SEP] Keyword[int] identifier[position] operator[SEP] {
Keyword[this] operator[SEP] identifier[mCurrentFolder] operator[=] identifier[position] operator[SEP] identifier[AlbumFolder] identifier[albumFolder] operator[=] identifier[mAlbumFolders] operator[SEP] identifier[get] operator[SEP] identifier[position] operator[SEP] operator[SEP] identifier[mView] operator[SEP] identifier[bindAlbumFolder] operator[SEP] identifier[albumFolder] operator[SEP] operator[SEP]
}
|
public boolean deselectFeature(Feature feature) {
if (selectedFeatures.containsKey(feature.getId())) {
Feature org = selectedFeatures.remove(feature.getId());
handlerManager.fireEvent(new FeatureDeselectedEvent(org));
return true;
} else {
return false;
}
} | class class_name[name] begin[{]
method[deselectFeature, return_type[type[boolean]], modifier[public], parameter[feature]] begin[{]
if[call[selectedFeatures.containsKey, parameter[call[feature.getId, parameter[]]]]] begin[{]
local_variable[type[Feature], org]
call[handlerManager.fireEvent, parameter[ClassCreator(arguments=[MemberReference(member=org, 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=FeatureDeselectedEvent, sub_type=None))]]
return[literal[true]]
else begin[{]
return[literal[false]]
end[}]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[deselectFeature] operator[SEP] identifier[Feature] identifier[feature] operator[SEP] {
Keyword[if] operator[SEP] identifier[selectedFeatures] operator[SEP] identifier[containsKey] operator[SEP] identifier[feature] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[Feature] identifier[org] operator[=] identifier[selectedFeatures] operator[SEP] identifier[remove] operator[SEP] identifier[feature] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[handlerManager] operator[SEP] identifier[fireEvent] operator[SEP] Keyword[new] identifier[FeatureDeselectedEvent] operator[SEP] identifier[org] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[else] {
Keyword[return] literal[boolean] operator[SEP]
}
}
|
public UUID addCustomPrebuiltEntity(UUID appId, String versionId, PrebuiltDomainModelCreateObject prebuiltDomainModelCreateObject) {
return addCustomPrebuiltEntityWithServiceResponseAsync(appId, versionId, prebuiltDomainModelCreateObject).toBlocking().single().body();
} | class class_name[name] begin[{]
method[addCustomPrebuiltEntity, return_type[type[UUID]], modifier[public], parameter[appId, versionId, prebuiltDomainModelCreateObject]] begin[{]
return[call[.addCustomPrebuiltEntityWithServiceResponseAsync, parameter[member[.appId], member[.versionId], member[.prebuiltDomainModelCreateObject]]]]
end[}]
END[}] | Keyword[public] identifier[UUID] identifier[addCustomPrebuiltEntity] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[PrebuiltDomainModelCreateObject] identifier[prebuiltDomainModelCreateObject] operator[SEP] {
Keyword[return] identifier[addCustomPrebuiltEntityWithServiceResponseAsync] operator[SEP] identifier[appId] , identifier[versionId] , identifier[prebuiltDomainModelCreateObject] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP]
}
|
public static base_responses add(nitro_service client, lbwlm resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
lbwlm addresources[] = new lbwlm[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new lbwlm();
addresources[i].wlmname = resources[i].wlmname;
addresources[i].ipaddress = resources[i].ipaddress;
addresources[i].port = resources[i].port;
addresources[i].lbuid = resources[i].lbuid;
addresources[i].katimeout = resources[i].katimeout;
}
result = add_bulk_request(client, addresources);
}
return result;
} | class class_name[name] begin[{]
method[add, return_type[type[base_responses]], modifier[public static], parameter[client, resources]] begin[{]
local_variable[type[base_responses], result]
if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, binary_operation[member[resources.length], >, literal[0]]]] begin[{]
local_variable[type[lbwlm], addresources]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=addresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=None, dimensions=None, name=lbwlm, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=addresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=wlmname, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=wlmname, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=addresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=ipaddress, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=ipaddress, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=addresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=port, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=port, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=addresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=lbuid, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=lbuid, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=addresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=katimeout, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=katimeout, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=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=resources, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
assign[member[.result], call[.add_bulk_request, parameter[member[.client], member[.addresources]]]]
else begin[{]
None
end[}]
return[member[.result]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[base_responses] identifier[add] operator[SEP] identifier[nitro_service] identifier[client] , identifier[lbwlm] identifier[resources] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[base_responses] identifier[result] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[resources] operator[!=] Other[null] operator[&&] identifier[resources] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] {
identifier[lbwlm] identifier[addresources] operator[SEP] operator[SEP] operator[=] Keyword[new] identifier[lbwlm] operator[SEP] identifier[resources] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[resources] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] {
identifier[addresources] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[new] identifier[lbwlm] operator[SEP] operator[SEP] operator[SEP] identifier[addresources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[wlmname] operator[=] identifier[resources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[wlmname] operator[SEP] identifier[addresources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[ipaddress] operator[=] identifier[resources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[ipaddress] operator[SEP] identifier[addresources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[port] operator[=] identifier[resources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[port] operator[SEP] identifier[addresources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[lbuid] operator[=] identifier[resources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[lbuid] operator[SEP] identifier[addresources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[katimeout] operator[=] identifier[resources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[katimeout] operator[SEP]
}
identifier[result] operator[=] identifier[add_bulk_request] operator[SEP] identifier[client] , identifier[addresources] operator[SEP] operator[SEP]
}
Keyword[return] identifier[result] operator[SEP]
}
|
public static PGPSecretKeyRing restoreSecretKeyBackup(SecretkeyElement backup, String backupCode)
throws InvalidBackupCodeException, IOException, PGPException {
byte[] encrypted = Base64.decode(backup.getB64Data());
byte[] decrypted;
try {
decrypted = PGPainless.decryptWithPassword(encrypted, new Passphrase(backupCode.toCharArray()));
} catch (IOException | PGPException e) {
throw new InvalidBackupCodeException("Could not decrypt secret key backup. Possibly wrong passphrase?", e);
}
return PGPainless.readKeyRing().secretKeyRing(decrypted);
} | class class_name[name] begin[{]
method[restoreSecretKeyBackup, return_type[type[PGPSecretKeyRing]], modifier[public static], parameter[backup, backupCode]] begin[{]
local_variable[type[byte], encrypted]
local_variable[type[byte], decrypted]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=decrypted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=encrypted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MethodInvocation(arguments=[], member=toCharArray, postfix_operators=[], prefix_operators=[], qualifier=backupCode, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Passphrase, sub_type=None))], member=decryptWithPassword, postfix_operators=[], prefix_operators=[], qualifier=PGPainless, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not decrypt secret key backup. Possibly wrong passphrase?"), 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=InvalidBackupCodeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException', 'PGPException']))], finally_block=None, label=None, resources=None)
return[call[PGPainless.readKeyRing, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[PGPSecretKeyRing] identifier[restoreSecretKeyBackup] operator[SEP] identifier[SecretkeyElement] identifier[backup] , identifier[String] identifier[backupCode] operator[SEP] Keyword[throws] identifier[InvalidBackupCodeException] , identifier[IOException] , identifier[PGPException] {
Keyword[byte] operator[SEP] operator[SEP] identifier[encrypted] operator[=] identifier[Base64] operator[SEP] identifier[decode] operator[SEP] identifier[backup] operator[SEP] identifier[getB64Data] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[decrypted] operator[SEP] Keyword[try] {
identifier[decrypted] operator[=] identifier[PGPainless] operator[SEP] identifier[decryptWithPassword] operator[SEP] identifier[encrypted] , Keyword[new] identifier[Passphrase] operator[SEP] identifier[backupCode] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[IOException] operator[|] identifier[PGPException] identifier[e] operator[SEP] {
Keyword[throw] Keyword[new] identifier[InvalidBackupCodeException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP]
}
Keyword[return] identifier[PGPainless] operator[SEP] identifier[readKeyRing] operator[SEP] operator[SEP] operator[SEP] identifier[secretKeyRing] operator[SEP] identifier[decrypted] operator[SEP] operator[SEP]
}
|
@Override
public void activate(ComponentContext context,
Map<String, Object> properties, ConfigurationAdmin configAdmin) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.entry(tc, "activate", new Object[] { context, properties,
configAdmin });
}
try {
// set ME state to starting
_state = ME_STATE.STARTING.toString();
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
SibTr.debug(this, tc, "Starting the JMS server.");
}
// initilize config object
initialize(context, properties, configAdmin);
_jsMainImpl = new JsMainImpl(context.getBundleContext());
_jsMainImpl.initialize(jsMEConfig);
_jsMainImpl.start();
// If its here it means all the components have started hence set
// the state to STARTED
_state = ME_STATE.STARTED.toString();
SibTr.info(tc, "ME_STARTED_SIAS0108");
} catch (InvalidFileStoreConfigurationException ifs) {
// since there is exception in starting ME the state is set to
// STOPPED
_state = ME_STATE.STOPPED.toString();
SibTr.error(tc, "ME_STOPPED_SIAS0109");
SibTr.exception(tc, ifs);
FFDCFilter.processException(ifs,
"com.ibm.ws.messaging.service.JsMainAdminServiceImpl",
"132", this);
} catch (Exception e) {
// since there is exception in starting ME the state is set to
// STOPPED
_state = ME_STATE.STOPPED.toString();
SibTr.error(tc, "ME_STOPPED_SIAS0109");
SibTr.exception(tc, e);
FFDCFilter.processException(e,
"com.ibm.ws.messaging.service.JsMainAdminServiceImpl",
"139", this);
}
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
SibTr.exit(tc, "activate");
}
} | class class_name[name] begin[{]
method[activate, return_type[void], modifier[public], parameter[context, properties, configAdmin]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member[.tc], literal["activate"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=properties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=configAdmin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]]
else begin[{]
None
end[}]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=_state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=ME_STATE.STARTING, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Starting the JMS server.")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=properties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=configAdmin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initialize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_jsMainImpl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBundleContext, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsMainImpl, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jsMEConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initialize, postfix_operators=[], prefix_operators=[], qualifier=_jsMainImpl, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=start, postfix_operators=[], prefix_operators=[], qualifier=_jsMainImpl, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=ME_STATE.STARTED, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ME_STARTED_SIAS0108")], member=info, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=_state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=ME_STATE.STOPPED, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ME_STOPPED_SIAS0109")], member=error, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ifs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ifs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.messaging.service.JsMainAdminServiceImpl"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="132"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ifs, types=['InvalidFileStoreConfigurationException'])), CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=_state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=ME_STATE.STOPPED, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ME_STOPPED_SIAS0109")], member=error, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.messaging.service.JsMainAdminServiceImpl"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="139"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, 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)
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.exit, parameter[member[.tc], literal["activate"]]]
else begin[{]
None
end[}]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[activate] operator[SEP] identifier[ComponentContext] identifier[context] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[properties] , identifier[ConfigurationAdmin] identifier[configAdmin] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] {
identifier[context] , identifier[properties] , identifier[configAdmin]
} operator[SEP] operator[SEP]
}
Keyword[try] {
identifier[_state] operator[=] identifier[ME_STATE] operator[SEP] identifier[STARTING] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP]
}
identifier[initialize] operator[SEP] identifier[context] , identifier[properties] , identifier[configAdmin] operator[SEP] operator[SEP] identifier[_jsMainImpl] operator[=] Keyword[new] identifier[JsMainImpl] operator[SEP] identifier[context] operator[SEP] identifier[getBundleContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[_jsMainImpl] operator[SEP] identifier[initialize] operator[SEP] identifier[jsMEConfig] operator[SEP] operator[SEP] identifier[_jsMainImpl] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] identifier[_state] operator[=] identifier[ME_STATE] operator[SEP] identifier[STARTED] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[info] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[InvalidFileStoreConfigurationException] identifier[ifs] operator[SEP] {
identifier[_state] operator[=] identifier[ME_STATE] operator[SEP] identifier[STOPPED] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] identifier[tc] , identifier[ifs] operator[SEP] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[ifs] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] {
identifier[_state] operator[=] identifier[ME_STATE] operator[SEP] identifier[STOPPED] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] identifier[tc] , identifier[e] operator[SEP] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP]
}
}
|
public void dhtPutItem(byte[] publicKey, byte[] privateKey, Entry entry, byte[] salt) {
s.dht_put_item(Vectors.bytes2byte_vector(publicKey),
Vectors.bytes2byte_vector(privateKey),
entry.swig(),
Vectors.bytes2byte_vector(salt));
} | class class_name[name] begin[{]
method[dhtPutItem, return_type[void], modifier[public], parameter[publicKey, privateKey, entry, salt]] begin[{]
call[s.dht_put_item, parameter[call[Vectors.bytes2byte_vector, parameter[member[.publicKey]]], call[Vectors.bytes2byte_vector, parameter[member[.privateKey]]], call[entry.swig, parameter[]], call[Vectors.bytes2byte_vector, parameter[member[.salt]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[dhtPutItem] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[publicKey] , Keyword[byte] operator[SEP] operator[SEP] identifier[privateKey] , identifier[Entry] identifier[entry] , Keyword[byte] operator[SEP] operator[SEP] identifier[salt] operator[SEP] {
identifier[s] operator[SEP] identifier[dht_put_item] operator[SEP] identifier[Vectors] operator[SEP] identifier[bytes2byte_vector] operator[SEP] identifier[publicKey] operator[SEP] , identifier[Vectors] operator[SEP] identifier[bytes2byte_vector] operator[SEP] identifier[privateKey] operator[SEP] , identifier[entry] operator[SEP] identifier[swig] operator[SEP] operator[SEP] , identifier[Vectors] operator[SEP] identifier[bytes2byte_vector] operator[SEP] identifier[salt] operator[SEP] operator[SEP] operator[SEP]
}
|
public void setFont(Font font) {
if (comboBox != null) {
comboBox.setFont(font);
}
super.setFont(font);
} | class class_name[name] begin[{]
method[setFont, return_type[void], modifier[public], parameter[font]] begin[{]
if[binary_operation[member[.comboBox], !=, literal[null]]] begin[{]
call[comboBox.setFont, parameter[member[.font]]]
else begin[{]
None
end[}]
SuperMethodInvocation(arguments=[MemberReference(member=font, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setFont, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setFont] operator[SEP] identifier[Font] identifier[font] operator[SEP] {
Keyword[if] operator[SEP] identifier[comboBox] operator[!=] Other[null] operator[SEP] {
identifier[comboBox] operator[SEP] identifier[setFont] operator[SEP] identifier[font] operator[SEP] operator[SEP]
}
Keyword[super] operator[SEP] identifier[setFont] operator[SEP] identifier[font] operator[SEP] operator[SEP]
}
|
public final Optional<? extends Style> getStyle(final String styleName) {
final String styleRef = this.styles.get(styleName);
if (styleRef != null) {
return this.styleParser.loadStyle(this, this.clientHttpRequestFactory, styleRef);
} else {
return Optional.empty();
}
} | class class_name[name] begin[{]
method[getStyle, return_type[type[Optional]], modifier[final public], parameter[styleName]] begin[{]
local_variable[type[String], styleRef]
if[binary_operation[member[.styleRef], !=, literal[null]]] begin[{]
return[THIS[member[None.styleParser]call[None.loadStyle, parameter[THIS[], THIS[member[None.clientHttpRequestFactory]], member[.styleRef]]]]]
else begin[{]
return[call[Optional.empty, parameter[]]]
end[}]
end[}]
END[}] | Keyword[public] Keyword[final] identifier[Optional] operator[<] operator[?] Keyword[extends] identifier[Style] operator[>] identifier[getStyle] operator[SEP] Keyword[final] identifier[String] identifier[styleName] operator[SEP] {
Keyword[final] identifier[String] identifier[styleRef] operator[=] Keyword[this] operator[SEP] identifier[styles] operator[SEP] identifier[get] operator[SEP] identifier[styleName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[styleRef] operator[!=] Other[null] operator[SEP] {
Keyword[return] Keyword[this] operator[SEP] identifier[styleParser] operator[SEP] identifier[loadStyle] operator[SEP] Keyword[this] , Keyword[this] operator[SEP] identifier[clientHttpRequestFactory] , identifier[styleRef] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[return] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP]
}
}
|
@SneakyThrows
public static <T extends Serializable> T decodeAndDeserializeObject(final byte[] object,
final CipherExecutor cipher,
final Class<T> type,
final Object[] parameters) {
val decoded = (byte[]) cipher.decode(object, parameters);
return deserializeAndCheckObject(decoded, type);
} | class class_name[name] begin[{]
method[decodeAndDeserializeObject, return_type[type[T]], modifier[public static], parameter[object, cipher, type, parameters]] begin[{]
local_variable[type[val], decoded]
return[call[.deserializeAndCheckObject, parameter[member[.decoded], member[.type]]]]
end[}]
END[}] | annotation[@] identifier[SneakyThrows] Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Serializable] operator[>] identifier[T] identifier[decodeAndDeserializeObject] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[object] , Keyword[final] identifier[CipherExecutor] identifier[cipher] , Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] {
identifier[val] identifier[decoded] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[cipher] operator[SEP] identifier[decode] operator[SEP] identifier[object] , identifier[parameters] operator[SEP] operator[SEP] Keyword[return] identifier[deserializeAndCheckObject] operator[SEP] identifier[decoded] , identifier[type] operator[SEP] operator[SEP]
}
|
public ApplicationListOptions withOcpDate(DateTime ocpDate) {
if (ocpDate == null) {
this.ocpDate = null;
} else {
this.ocpDate = new DateTimeRfc1123(ocpDate);
}
return this;
} | class class_name[name] begin[{]
method[withOcpDate, return_type[type[ApplicationListOptions]], modifier[public], parameter[ocpDate]] begin[{]
if[binary_operation[member[.ocpDate], ==, literal[null]]] begin[{]
assign[THIS[member[None.ocpDate]], literal[null]]
else begin[{]
assign[THIS[member[None.ocpDate]], ClassCreator(arguments=[MemberReference(member=ocpDate, 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=DateTimeRfc1123, sub_type=None))]
end[}]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[ApplicationListOptions] identifier[withOcpDate] operator[SEP] identifier[DateTime] identifier[ocpDate] operator[SEP] {
Keyword[if] operator[SEP] identifier[ocpDate] operator[==] Other[null] operator[SEP] {
Keyword[this] operator[SEP] identifier[ocpDate] operator[=] Other[null] operator[SEP]
}
Keyword[else] {
Keyword[this] operator[SEP] identifier[ocpDate] operator[=] Keyword[new] identifier[DateTimeRfc1123] operator[SEP] identifier[ocpDate] operator[SEP] operator[SEP]
}
Keyword[return] Keyword[this] operator[SEP]
}
|
@Override
Iterator<C> createColumnKeyIterator() {
final Comparator<? super C> comparator = columnComparator();
final Iterator<C> merged =
Iterators.mergeSorted(
Iterables.transform(
backingMap.values(),
new Function<Map<C, V>, Iterator<C>>() {
@Override
public Iterator<C> apply(Map<C, V> input) {
return input.keySet().iterator();
}
}),
comparator);
return new AbstractIterator<C>() {
@NullableDecl C lastValue;
@Override
protected C computeNext() {
while (merged.hasNext()) {
C next = merged.next();
boolean duplicate = lastValue != null && comparator.compare(next, lastValue) == 0;
// Keep looping till we find a non-duplicate value.
if (!duplicate) {
lastValue = next;
return lastValue;
}
}
lastValue = null; // clear reference to unused data
return endOfData();
}
};
} | class class_name[name] begin[{]
method[createColumnKeyIterator, return_type[type[Iterator]], modifier[default], parameter[]] begin[{]
local_variable[type[Comparator], comparator]
local_variable[type[Iterator], merged]
return[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[Annotation(element=None, name=NullableDecl)], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=lastValue)], documentation=None, modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=C, sub_type=None)), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=merged, selectors=[], type_arguments=None), name=next)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=C, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=lastValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lastValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compare, postfix_operators=[], prefix_operators=[], qualifier=comparator, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operator=&&), name=duplicate)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=MemberReference(member=duplicate, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), ReturnStatement(expression=MemberReference(member=lastValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=merged, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), ReturnStatement(expression=MethodInvocation(arguments=[], member=endOfData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'protected'}, name=computeNext, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=C, 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=C, sub_type=None))], dimensions=None, name=AbstractIterator, sub_type=None))]
end[}]
END[}] | annotation[@] identifier[Override] identifier[Iterator] operator[<] identifier[C] operator[>] identifier[createColumnKeyIterator] operator[SEP] operator[SEP] {
Keyword[final] identifier[Comparator] operator[<] operator[?] Keyword[super] identifier[C] operator[>] identifier[comparator] operator[=] identifier[columnComparator] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Iterator] operator[<] identifier[C] operator[>] identifier[merged] operator[=] identifier[Iterators] operator[SEP] identifier[mergeSorted] operator[SEP] identifier[Iterables] operator[SEP] identifier[transform] operator[SEP] identifier[backingMap] operator[SEP] identifier[values] operator[SEP] operator[SEP] , Keyword[new] identifier[Function] operator[<] identifier[Map] operator[<] identifier[C] , identifier[V] operator[>] , identifier[Iterator] operator[<] identifier[C] operator[>] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] identifier[Iterator] operator[<] identifier[C] operator[>] identifier[apply] operator[SEP] identifier[Map] operator[<] identifier[C] , identifier[V] operator[>] identifier[input] operator[SEP] {
Keyword[return] identifier[input] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP]
}
} operator[SEP] , identifier[comparator] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[AbstractIterator] operator[<] identifier[C] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[NullableDecl] identifier[C] identifier[lastValue] operator[SEP] annotation[@] identifier[Override] Keyword[protected] identifier[C] identifier[computeNext] operator[SEP] operator[SEP] {
Keyword[while] operator[SEP] identifier[merged] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] {
identifier[C] identifier[next] operator[=] identifier[merged] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[duplicate] operator[=] identifier[lastValue] operator[!=] Other[null] operator[&&] identifier[comparator] operator[SEP] identifier[compare] operator[SEP] identifier[next] , identifier[lastValue] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[duplicate] operator[SEP] {
identifier[lastValue] operator[=] identifier[next] operator[SEP] Keyword[return] identifier[lastValue] operator[SEP]
}
}
identifier[lastValue] operator[=] Other[null] operator[SEP] Keyword[return] identifier[endOfData] operator[SEP] operator[SEP] operator[SEP]
}
} operator[SEP]
}
|
@Override
public boolean equalsKey(long address, WrappedBytes wrappedBytes) {
// 16 bytes for eviction if needed (optional)
// 8 bytes for linked pointer
int headerOffset = evictionEnabled ? 24 : 8;
byte type = MEMORY.getByte(address, headerOffset);
headerOffset++;
// First if hashCode doesn't match then the key can't be equal
int hashCode = wrappedBytes.hashCode();
if (hashCode != MEMORY.getInt(address, headerOffset)) {
return false;
}
headerOffset += 4;
// If the length of the key is not the same it can't match either!
int keyLength = MEMORY.getInt(address, headerOffset);
if (keyLength != wrappedBytes.getLength()) {
return false;
}
headerOffset += 4;
if (requiresMetadataSize(type)) {
headerOffset += 4;
}
// This is for the value size which we don't need to read
headerOffset += 4;
// Finally read each byte individually so we don't have to copy them into a byte[]
for (int i = 0; i < keyLength; i++) {
byte b = MEMORY.getByte(address, headerOffset + i);
if (b != wrappedBytes.getByte(i))
return false;
}
return true;
} | class class_name[name] begin[{]
method[equalsKey, return_type[type[boolean]], modifier[public], parameter[address, wrappedBytes]] begin[{]
local_variable[type[int], headerOffset]
local_variable[type[byte], type]
member[.headerOffset]
local_variable[type[int], hashCode]
if[binary_operation[member[.hashCode], !=, call[MEMORY.getInt, parameter[member[.address], member[.headerOffset]]]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
assign[member[.headerOffset], literal[4]]
local_variable[type[int], keyLength]
if[binary_operation[member[.keyLength], !=, call[wrappedBytes.getLength, parameter[]]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
assign[member[.headerOffset], literal[4]]
if[call[.requiresMetadataSize, parameter[member[.type]]]] begin[{]
assign[member[.headerOffset], literal[4]]
else begin[{]
None
end[}]
assign[member[.headerOffset], literal[4]]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=address, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=headerOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=getByte, postfix_operators=[], prefix_operators=[], qualifier=MEMORY, selectors=[], type_arguments=None), name=b)], modifiers=set(), type=BasicType(dimensions=[], name=byte)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getByte, postfix_operators=[], prefix_operators=[], qualifier=wrappedBytes, selectors=[], type_arguments=None), operator=!=), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=keyLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
return[literal[true]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[equalsKey] operator[SEP] Keyword[long] identifier[address] , identifier[WrappedBytes] identifier[wrappedBytes] operator[SEP] {
Keyword[int] identifier[headerOffset] operator[=] identifier[evictionEnabled] operator[?] Other[24] operator[:] Other[8] operator[SEP] Keyword[byte] identifier[type] operator[=] identifier[MEMORY] operator[SEP] identifier[getByte] operator[SEP] identifier[address] , identifier[headerOffset] operator[SEP] operator[SEP] identifier[headerOffset] operator[++] operator[SEP] Keyword[int] identifier[hashCode] operator[=] identifier[wrappedBytes] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hashCode] operator[!=] identifier[MEMORY] operator[SEP] identifier[getInt] operator[SEP] identifier[address] , identifier[headerOffset] operator[SEP] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
identifier[headerOffset] operator[+=] Other[4] operator[SEP] Keyword[int] identifier[keyLength] operator[=] identifier[MEMORY] operator[SEP] identifier[getInt] operator[SEP] identifier[address] , identifier[headerOffset] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[keyLength] operator[!=] identifier[wrappedBytes] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] literal[boolean] operator[SEP]
}
identifier[headerOffset] operator[+=] Other[4] operator[SEP] Keyword[if] operator[SEP] identifier[requiresMetadataSize] operator[SEP] identifier[type] operator[SEP] operator[SEP] {
identifier[headerOffset] operator[+=] Other[4] operator[SEP]
}
identifier[headerOffset] operator[+=] Other[4] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[keyLength] operator[SEP] identifier[i] operator[++] operator[SEP] {
Keyword[byte] identifier[b] operator[=] identifier[MEMORY] operator[SEP] identifier[getByte] operator[SEP] identifier[address] , identifier[headerOffset] operator[+] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[b] operator[!=] identifier[wrappedBytes] operator[SEP] identifier[getByte] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP]
}
Keyword[return] literal[boolean] operator[SEP]
}
|
public BinaryEncoder writeBytes(byte[] bytes) throws IOException {
writeLong(bytes.length);
output.write(bytes, 0, bytes.length);
return this;
} | class class_name[name] begin[{]
method[writeBytes, return_type[type[BinaryEncoder]], modifier[public], parameter[bytes]] begin[{]
call[.writeLong, parameter[member[bytes.length]]]
call[output.write, parameter[member[.bytes], literal[0], member[bytes.length]]]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[BinaryEncoder] identifier[writeBytes] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[writeLong] operator[SEP] identifier[bytes] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[write] operator[SEP] identifier[bytes] , Other[0] , identifier[bytes] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP]
}
|
public ShowInfo getShowInfo(String showID) throws TVRageException {
int id = NumberUtils.toInt(showID, 0);
if (id > 0) {
return getShowInfo(id);
} else {
return new ShowInfo();
}
} | class class_name[name] begin[{]
method[getShowInfo, return_type[type[ShowInfo]], modifier[public], parameter[showID]] begin[{]
local_variable[type[int], id]
if[binary_operation[member[.id], >, literal[0]]] begin[{]
return[call[.getShowInfo, parameter[member[.id]]]]
else begin[{]
return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ShowInfo, sub_type=None))]
end[}]
end[}]
END[}] | Keyword[public] identifier[ShowInfo] identifier[getShowInfo] operator[SEP] identifier[String] identifier[showID] operator[SEP] Keyword[throws] identifier[TVRageException] {
Keyword[int] identifier[id] operator[=] identifier[NumberUtils] operator[SEP] identifier[toInt] operator[SEP] identifier[showID] , Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[id] operator[>] Other[0] operator[SEP] {
Keyword[return] identifier[getShowInfo] operator[SEP] identifier[id] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[return] Keyword[new] identifier[ShowInfo] operator[SEP] operator[SEP] operator[SEP]
}
}
|
public void marshall(GetInstanceRequest getInstanceRequest, ProtocolMarshaller protocolMarshaller) {
if (getInstanceRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(getInstanceRequest.getInstanceName(), INSTANCENAME_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
} | class class_name[name] begin[{]
method[marshall, return_type[void], modifier[public], parameter[getInstanceRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.getInstanceRequest], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)
else begin[{]
None
end[}]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getInstanceName, postfix_operators=[], prefix_operators=[], qualifier=getInstanceRequest, selectors=[], type_arguments=None), MemberReference(member=INSTANCENAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)
end[}]
END[}] | Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetInstanceRequest] identifier[getInstanceRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[getInstanceRequest] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[try] {
identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[getInstanceRequest] operator[SEP] identifier[getInstanceName] operator[SEP] operator[SEP] , identifier[INSTANCENAME_BINDING] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] {
Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP]
}
}
|
AggregatedHttpMessage maybeCacheNames(boolean shouldCacheControl, List<String> values) {
Collections.sort(values);
byte[] body = JsonCodec.writeList(QUOTED_STRING_WRITER, values);
HttpHeaders headers = HttpHeaders.of(200)
.contentType(MediaType.JSON)
.setInt(HttpHeaderNames.CONTENT_LENGTH, body.length);
if (shouldCacheControl) {
headers = headers.add(
HttpHeaderNames.CACHE_CONTROL,
CacheControl.maxAge(namesMaxAge, TimeUnit.SECONDS).mustRevalidate().getHeaderValue()
);
}
return AggregatedHttpMessage.of(headers, HttpData.of(body));
} | class class_name[name] begin[{]
method[maybeCacheNames, return_type[type[AggregatedHttpMessage]], modifier[default], parameter[shouldCacheControl, values]] begin[{]
call[Collections.sort, parameter[member[.values]]]
local_variable[type[byte], body]
local_variable[type[HttpHeaders], headers]
if[member[.shouldCacheControl]] begin[{]
assign[member[.headers], call[headers.add, parameter[member[HttpHeaderNames.CACHE_CONTROL], call[CacheControl.maxAge, parameter[member[.namesMaxAge], member[TimeUnit.SECONDS]]]]]]
else begin[{]
None
end[}]
return[call[AggregatedHttpMessage.of, parameter[member[.headers], call[HttpData.of, parameter[member[.body]]]]]]
end[}]
END[}] | identifier[AggregatedHttpMessage] identifier[maybeCacheNames] operator[SEP] Keyword[boolean] identifier[shouldCacheControl] , identifier[List] operator[<] identifier[String] operator[>] identifier[values] operator[SEP] {
identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[values] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[body] operator[=] identifier[JsonCodec] operator[SEP] identifier[writeList] operator[SEP] identifier[QUOTED_STRING_WRITER] , identifier[values] operator[SEP] operator[SEP] identifier[HttpHeaders] identifier[headers] operator[=] identifier[HttpHeaders] operator[SEP] identifier[of] operator[SEP] Other[200] operator[SEP] operator[SEP] identifier[contentType] operator[SEP] identifier[MediaType] operator[SEP] identifier[JSON] operator[SEP] operator[SEP] identifier[setInt] operator[SEP] identifier[HttpHeaderNames] operator[SEP] identifier[CONTENT_LENGTH] , identifier[body] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[shouldCacheControl] operator[SEP] {
identifier[headers] operator[=] identifier[headers] operator[SEP] identifier[add] operator[SEP] identifier[HttpHeaderNames] operator[SEP] identifier[CACHE_CONTROL] , identifier[CacheControl] operator[SEP] identifier[maxAge] operator[SEP] identifier[namesMaxAge] , identifier[TimeUnit] operator[SEP] identifier[SECONDS] operator[SEP] operator[SEP] identifier[mustRevalidate] operator[SEP] operator[SEP] operator[SEP] identifier[getHeaderValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] identifier[AggregatedHttpMessage] operator[SEP] identifier[of] operator[SEP] identifier[headers] , identifier[HttpData] operator[SEP] identifier[of] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP]
}
|
public static <V> DocumentTreeResult<V> ok(V result) {
return new DocumentTreeResult<V>(Status.OK, result);
} | class class_name[name] begin[{]
method[ok, return_type[type[DocumentTreeResult]], modifier[public static], parameter[result]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=OK, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[]), MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=None, name=DocumentTreeResult, sub_type=None))]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[V] operator[>] identifier[DocumentTreeResult] operator[<] identifier[V] operator[>] identifier[ok] operator[SEP] identifier[V] identifier[result] operator[SEP] {
Keyword[return] Keyword[new] identifier[DocumentTreeResult] operator[<] identifier[V] operator[>] operator[SEP] identifier[Status] operator[SEP] identifier[OK] , identifier[result] operator[SEP] operator[SEP]
}
|
public static Collection<Class<?>> getInterfaces(Class<?> object, Class<?> base)
{
Check.notNull(object);
Check.notNull(base);
final Collection<Class<?>> interfaces = new ArrayList<>();
Class<?> current = object;
while (current != null)
{
final Deque<Class<?>> currents = new ArrayDeque<>(filterInterfaces(current, base));
final Deque<Class<?>> nexts = new ArrayDeque<>();
while (!currents.isEmpty())
{
nexts.clear();
interfaces.addAll(currents);
checkInterfaces(base, currents, nexts);
currents.clear();
currents.addAll(nexts);
nexts.clear();
}
current = current.getSuperclass();
}
return interfaces;
} | class class_name[name] begin[{]
method[getInterfaces, return_type[type[Collection]], modifier[public static], parameter[object, base]] begin[{]
call[Check.notNull, parameter[member[.object]]]
call[Check.notNull, parameter[member[.base]]]
local_variable[type[Collection], interfaces]
local_variable[type[Class], current]
while[binary_operation[member[.current], !=, literal[null]]] begin[{]
local_variable[type[Deque], currents]
local_variable[type[Deque], nexts]
while[call[currents.isEmpty, parameter[]]] begin[{]
call[nexts.clear, parameter[]]
call[interfaces.addAll, parameter[member[.currents]]]
call[.checkInterfaces, parameter[member[.base], member[.currents], member[.nexts]]]
call[currents.clear, parameter[]]
call[currents.addAll, parameter[member[.nexts]]]
call[nexts.clear, parameter[]]
end[}]
assign[member[.current], call[current.getSuperclass, parameter[]]]
end[}]
return[member[.interfaces]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Collection] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[getInterfaces] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[object] , identifier[Class] operator[<] operator[?] operator[>] identifier[base] operator[SEP] {
identifier[Check] operator[SEP] identifier[notNull] operator[SEP] identifier[object] operator[SEP] operator[SEP] identifier[Check] operator[SEP] identifier[notNull] operator[SEP] identifier[base] operator[SEP] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[interfaces] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[current] operator[=] identifier[object] operator[SEP] Keyword[while] operator[SEP] identifier[current] operator[!=] Other[null] operator[SEP] {
Keyword[final] identifier[Deque] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[currents] operator[=] Keyword[new] identifier[ArrayDeque] operator[<] operator[>] operator[SEP] identifier[filterInterfaces] operator[SEP] identifier[current] , identifier[base] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Deque] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[nexts] operator[=] Keyword[new] identifier[ArrayDeque] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[currents] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
identifier[nexts] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[interfaces] operator[SEP] identifier[addAll] operator[SEP] identifier[currents] operator[SEP] operator[SEP] identifier[checkInterfaces] operator[SEP] identifier[base] , identifier[currents] , identifier[nexts] operator[SEP] operator[SEP] identifier[currents] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[currents] operator[SEP] identifier[addAll] operator[SEP] identifier[nexts] operator[SEP] operator[SEP] identifier[nexts] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP]
}
identifier[current] operator[=] identifier[current] operator[SEP] identifier[getSuperclass] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] identifier[interfaces] operator[SEP]
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.