code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public Matrix4f scaleAround(float factor, float ox, float oy, float oz) {
return scaleAround(factor, factor, factor, ox, oy, oz, thisOrNew());
} | class class_name[name] begin[{]
method[scaleAround, return_type[type[Matrix4f]], modifier[public], parameter[factor, ox, oy, oz]] begin[{]
return[call[.scaleAround, parameter[member[.factor], member[.factor], member[.factor], member[.ox], member[.oy], member[.oz], call[.thisOrNew, parameter[]]]]]
end[}]
END[}] | Keyword[public] identifier[Matrix4f] identifier[scaleAround] operator[SEP] Keyword[float] identifier[factor] , Keyword[float] identifier[ox] , Keyword[float] identifier[oy] , Keyword[float] identifier[oz] operator[SEP] {
Keyword[return] identifier[scaleAround] operator[SEP] identifier[factor] , identifier[factor] , identifier[factor] , identifier[ox] , identifier[oy] , identifier[oz] , identifier[thisOrNew] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
|
private void handleTypeAndAttributes(Node node, Map<String, Object> elementMap) {
// Set type
if (node.getLocalName() != null) {
elementMap.put("_type", node.getLocalName());
}
// Set the attributes
if (node.getAttributes() != null) {
NamedNodeMap attributeMap = node.getAttributes();
for (int i = 0; i < attributeMap.getLength(); i++) {
Node attribute = attributeMap.item(i);
elementMap.put(attribute.getNodeName(), attribute.getNodeValue());
}
}
} | class class_name[name] begin[{]
method[handleTypeAndAttributes, return_type[void], modifier[private], parameter[node, elementMap]] begin[{]
if[binary_operation[call[node.getLocalName, parameter[]], !=, literal[null]]] begin[{]
call[elementMap.put, parameter[literal["_type"], call[node.getLocalName, parameter[]]]]
else begin[{]
None
end[}]
if[binary_operation[call[node.getAttributes, parameter[]], !=, literal[null]]] begin[{]
local_variable[type[NamedNodeMap], attributeMap]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=item, postfix_operators=[], prefix_operators=[], qualifier=attributeMap, selectors=[], type_arguments=None), name=attribute)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNodeName, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getNodeValue, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=elementMap, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=attributeMap, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[handleTypeAndAttributes] operator[SEP] identifier[Node] identifier[node] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[elementMap] operator[SEP] {
Keyword[if] operator[SEP] identifier[node] operator[SEP] identifier[getLocalName] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] {
identifier[elementMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[node] operator[SEP] identifier[getLocalName] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[node] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] {
identifier[NamedNodeMap] identifier[attributeMap] operator[=] identifier[node] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[attributeMap] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] {
identifier[Node] identifier[attribute] operator[=] identifier[attributeMap] operator[SEP] identifier[item] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[elementMap] operator[SEP] identifier[put] operator[SEP] identifier[attribute] operator[SEP] identifier[getNodeName] operator[SEP] operator[SEP] , identifier[attribute] operator[SEP] identifier[getNodeValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
}
|
public static void read(Swagger swagger, Set<Class<?>> classes) {
final SwaggerAnnotationsReader reader = new SwaggerAnnotationsReader(swagger);
for (Class<?> cls : classes) {
final ReaderContext context = new ReaderContext(swagger, cls, "", null, false, new ArrayList<>(),
new ArrayList<>(), new ArrayList<>(), new ArrayList<>());
reader.read(context);
}
} | class class_name[name] begin[{]
method[read, return_type[void], modifier[public static], parameter[swagger, classes]] begin[{]
local_variable[type[SwaggerAnnotationsReader], reader]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=swagger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cls, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ReaderContext, sub_type=None)), name=context)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ReaderContext, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=classes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cls)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))), label=None)
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[read] operator[SEP] identifier[Swagger] identifier[swagger] , identifier[Set] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[classes] operator[SEP] {
Keyword[final] identifier[SwaggerAnnotationsReader] identifier[reader] operator[=] Keyword[new] identifier[SwaggerAnnotationsReader] operator[SEP] identifier[swagger] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[cls] operator[:] identifier[classes] operator[SEP] {
Keyword[final] identifier[ReaderContext] identifier[context] operator[=] Keyword[new] identifier[ReaderContext] operator[SEP] identifier[swagger] , identifier[cls] , literal[String] , Other[null] , literal[boolean] , Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] , Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] , Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] , Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[reader] operator[SEP] identifier[read] operator[SEP] identifier[context] operator[SEP] operator[SEP]
}
}
|
public static Method getSetter(Class<?> clazz, String fieldName) {
StringBuilder sb = new StringBuilder("set").append(
Character.toUpperCase(fieldName.charAt(0))).append(fieldName,
1, fieldName.length());
final String internedName = sb.toString().intern();
return traverseHierarchy(clazz, new TraverseTask<Method>() {
@Override
public Method run(Class<?> clazz) {
Method[] methods = clazz.getDeclaredMethods();
Method res = null;
for (int i = 0; i < methods.length; i++) {
Method m = methods[i];
if (isSetterSignature(m)) {
if (m.getName() == internedName
&& (res == null
|| res.getParameterTypes()[0].isAssignableFrom(m.getParameterTypes()[0]))) {
res = m;
}
}
}
return res;
}
});
} | class class_name[name] begin[{]
method[getSetter, return_type[type[Method]], modifier[public static], parameter[clazz, fieldName]] begin[{]
local_variable[type[StringBuilder], sb]
local_variable[type[String], internedName]
return[call[.traverseHierarchy, parameter[member[.clazz], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDeclaredMethods, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None), name=methods)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Method, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=res)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=methods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=m)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isSetterSignature, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), operandr=MemberReference(member=internedName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=getParameterTypes, postfix_operators=[], prefix_operators=[], qualifier=res, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getParameterTypes, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], type_arguments=None)], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=methods, 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), ReturnStatement(expression=MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[FormalParameter(annotations=[], modifiers=set(), name=clazz, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=Method, 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=Method, sub_type=None))], dimensions=None, name=TraverseTask, sub_type=None))]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Method] identifier[getSetter] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[String] identifier[fieldName] operator[SEP] {
identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[Character] operator[SEP] identifier[toUpperCase] operator[SEP] identifier[fieldName] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[fieldName] , Other[1] , identifier[fieldName] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[internedName] operator[=] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[intern] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[traverseHierarchy] operator[SEP] identifier[clazz] , Keyword[new] identifier[TraverseTask] operator[<] identifier[Method] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] identifier[Method] identifier[run] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] {
identifier[Method] operator[SEP] operator[SEP] identifier[methods] operator[=] identifier[clazz] operator[SEP] identifier[getDeclaredMethods] operator[SEP] operator[SEP] operator[SEP] identifier[Method] identifier[res] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[methods] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] {
identifier[Method] identifier[m] operator[=] identifier[methods] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isSetterSignature] operator[SEP] identifier[m] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[==] identifier[internedName] operator[&&] operator[SEP] identifier[res] operator[==] Other[null] operator[||] identifier[res] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[m] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[res] operator[=] identifier[m] operator[SEP]
}
}
}
Keyword[return] identifier[res] operator[SEP]
}
} operator[SEP] operator[SEP]
}
|
public final void load(InputStream stream, char[] password)
throws IOException, NoSuchAlgorithmException, CertificateException
{
keyStoreSpi.engineLoad(stream, password);
initialized = true;
} | class class_name[name] begin[{]
method[load, return_type[void], modifier[final public], parameter[stream, password]] begin[{]
call[keyStoreSpi.engineLoad, parameter[member[.stream], member[.password]]]
assign[member[.initialized], literal[true]]
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[void] identifier[load] operator[SEP] identifier[InputStream] identifier[stream] , Keyword[char] operator[SEP] operator[SEP] identifier[password] operator[SEP] Keyword[throws] identifier[IOException] , identifier[NoSuchAlgorithmException] , identifier[CertificateException] {
identifier[keyStoreSpi] operator[SEP] identifier[engineLoad] operator[SEP] identifier[stream] , identifier[password] operator[SEP] operator[SEP] identifier[initialized] operator[=] literal[boolean] operator[SEP]
}
|
public static int getSingleCodePoint(CharSequence s) {
if (s == null || s.length() == 0) {
return -1;
} else if (s.length() == 1) {
return s.charAt(0);
} else if (s.length() > 2) {
return -1;
}
// at this point, len = 2
int cp = Character.codePointAt(s, 0);
if (cp > 0xFFFF) { // is surrogate pair
return cp;
}
return -1;
} | class class_name[name] begin[{]
method[getSingleCodePoint, return_type[type[int]], modifier[public static], parameter[s]] begin[{]
if[binary_operation[binary_operation[member[.s], ==, literal[null]], ||, binary_operation[call[s.length, parameter[]], ==, literal[0]]]] begin[{]
return[literal[1]]
else begin[{]
if[binary_operation[call[s.length, parameter[]], ==, literal[1]]] begin[{]
return[call[s.charAt, parameter[literal[0]]]]
else begin[{]
if[binary_operation[call[s.length, parameter[]], >, literal[2]]] begin[{]
return[literal[1]]
else begin[{]
None
end[}]
end[}]
end[}]
local_variable[type[int], cp]
if[binary_operation[member[.cp], >, literal[0xFFFF]]] begin[{]
return[member[.cp]]
else begin[{]
None
end[}]
return[literal[1]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[int] identifier[getSingleCodePoint] operator[SEP] identifier[CharSequence] identifier[s] operator[SEP] {
Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[||] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] {
Keyword[return] operator[-] Other[1] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] {
Keyword[return] identifier[s] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[2] operator[SEP] {
Keyword[return] operator[-] Other[1] operator[SEP]
}
Keyword[int] identifier[cp] operator[=] identifier[Character] operator[SEP] identifier[codePointAt] operator[SEP] identifier[s] , Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cp] operator[>] literal[Integer] operator[SEP] {
Keyword[return] identifier[cp] operator[SEP]
}
Keyword[return] operator[-] Other[1] operator[SEP]
}
|
public static Map<String, Object> newFlatKeyMap(Map<String, ?> map) {
return newFlatKeyMap(new HashMap<>(), map);
} | class class_name[name] begin[{]
method[newFlatKeyMap, return_type[type[Map]], modifier[public static], parameter[map]] begin[{]
return[call[.newFlatKeyMap, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=HashMap, sub_type=None)), member[.map]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[newFlatKeyMap] operator[SEP] identifier[Map] operator[<] identifier[String] , operator[?] operator[>] identifier[map] operator[SEP] {
Keyword[return] identifier[newFlatKeyMap] operator[SEP] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] , identifier[map] operator[SEP] operator[SEP]
}
|
public RuleDescription createRule(String topicName, String subscriptionName, RuleDescription ruleDescription) throws ServiceBusException, InterruptedException {
return Utils.completeFuture(this.asyncClient.createRuleAsync(topicName, subscriptionName, ruleDescription));
} | class class_name[name] begin[{]
method[createRule, return_type[type[RuleDescription]], modifier[public], parameter[topicName, subscriptionName, ruleDescription]] begin[{]
return[call[Utils.completeFuture, parameter[THIS[member[None.asyncClient]call[None.createRuleAsync, parameter[member[.topicName], member[.subscriptionName], member[.ruleDescription]]]]]]]
end[}]
END[}] | Keyword[public] identifier[RuleDescription] identifier[createRule] operator[SEP] identifier[String] identifier[topicName] , identifier[String] identifier[subscriptionName] , identifier[RuleDescription] identifier[ruleDescription] operator[SEP] Keyword[throws] identifier[ServiceBusException] , identifier[InterruptedException] {
Keyword[return] identifier[Utils] operator[SEP] identifier[completeFuture] operator[SEP] Keyword[this] operator[SEP] identifier[asyncClient] operator[SEP] identifier[createRuleAsync] operator[SEP] identifier[topicName] , identifier[subscriptionName] , identifier[ruleDescription] operator[SEP] operator[SEP] operator[SEP]
}
|
protected void unsetAuthDataService(ServiceReference<AuthDataService> ref) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "unsetAuthDataService", ref);
authDataServiceRef.unsetReference(ref);
} | class class_name[name] begin[{]
method[unsetAuthDataService, return_type[void], modifier[protected], parameter[ref]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{]
call[Tr.debug, parameter[member[.tc], literal["unsetAuthDataService"], member[.ref]]]
else begin[{]
None
end[}]
call[authDataServiceRef.unsetReference, parameter[member[.ref]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[unsetAuthDataService] operator[SEP] identifier[ServiceReference] operator[<] identifier[AuthDataService] operator[>] identifier[ref] 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[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[ref] operator[SEP] operator[SEP] identifier[authDataServiceRef] operator[SEP] identifier[unsetReference] operator[SEP] identifier[ref] operator[SEP] operator[SEP]
}
|
public static void extractSpecialContent (@Nonnull final IHCNode aNode,
@Nonnull final AbstractHCSpecialNodes <?> aSpecialNodes,
@Nullable final IHCOnDocumentReadyProvider aOnDocumentReadyProvider)
{
ValueEnforcer.notNull (aNode, "Node");
ValueEnforcer.notNull (aSpecialNodes, "SpecialNodes");
// Extract all out of band nodes from the passed node
ICommonsList <IHCNode> aExtractedOutOfBandNodes = new CommonsArrayList<> ();
recursiveExtractAndRemoveOutOfBandNodes (aNode, aExtractedOutOfBandNodes);
// Merge JS/CSS nodes - replace list content
aExtractedOutOfBandNodes = getMergedInlineCSSAndJSNodes (aExtractedOutOfBandNodes, aOnDocumentReadyProvider);
// Extract the special nodes into the provided object
aExtractedOutOfBandNodes = extractSpecialNodes (aExtractedOutOfBandNodes, aSpecialNodes);
// Now the aExtractedOutOfBandNodes list must be empty - otherwise we have
// an internal inconsistency
if (aExtractedOutOfBandNodes.isNotEmpty ())
throw new IllegalStateException ("Out-of-band nodes are left after merging and extraction: " +
aExtractedOutOfBandNodes);
} | class class_name[name] begin[{]
method[extractSpecialContent, return_type[void], modifier[public static], parameter[aNode, aSpecialNodes, aOnDocumentReadyProvider]] begin[{]
call[ValueEnforcer.notNull, parameter[member[.aNode], literal["Node"]]]
call[ValueEnforcer.notNull, parameter[member[.aSpecialNodes], literal["SpecialNodes"]]]
local_variable[type[ICommonsList], aExtractedOutOfBandNodes]
call[.recursiveExtractAndRemoveOutOfBandNodes, parameter[member[.aNode], member[.aExtractedOutOfBandNodes]]]
assign[member[.aExtractedOutOfBandNodes], call[.getMergedInlineCSSAndJSNodes, parameter[member[.aExtractedOutOfBandNodes], member[.aOnDocumentReadyProvider]]]]
assign[member[.aExtractedOutOfBandNodes], call[.extractSpecialNodes, parameter[member[.aExtractedOutOfBandNodes], member[.aSpecialNodes]]]]
if[call[aExtractedOutOfBandNodes.isNotEmpty, parameter[]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Out-of-band nodes are left after merging and extraction: "), operandr=MemberReference(member=aExtractedOutOfBandNodes, 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=IllegalStateException, sub_type=None)), label=None)
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[extractSpecialContent] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IHCNode] identifier[aNode] , annotation[@] identifier[Nonnull] Keyword[final] identifier[AbstractHCSpecialNodes] operator[<] operator[?] operator[>] identifier[aSpecialNodes] , annotation[@] identifier[Nullable] Keyword[final] identifier[IHCOnDocumentReadyProvider] identifier[aOnDocumentReadyProvider] operator[SEP] {
identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aNode] , literal[String] operator[SEP] operator[SEP] identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aSpecialNodes] , literal[String] operator[SEP] operator[SEP] identifier[ICommonsList] operator[<] identifier[IHCNode] operator[>] identifier[aExtractedOutOfBandNodes] operator[=] Keyword[new] identifier[CommonsArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[recursiveExtractAndRemoveOutOfBandNodes] operator[SEP] identifier[aNode] , identifier[aExtractedOutOfBandNodes] operator[SEP] operator[SEP] identifier[aExtractedOutOfBandNodes] operator[=] identifier[getMergedInlineCSSAndJSNodes] operator[SEP] identifier[aExtractedOutOfBandNodes] , identifier[aOnDocumentReadyProvider] operator[SEP] operator[SEP] identifier[aExtractedOutOfBandNodes] operator[=] identifier[extractSpecialNodes] operator[SEP] identifier[aExtractedOutOfBandNodes] , identifier[aSpecialNodes] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[aExtractedOutOfBandNodes] operator[SEP] identifier[isNotEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[aExtractedOutOfBandNodes] operator[SEP] operator[SEP]
}
|
public <R> ResourceRepresentation<R> withValue(R newValue) {
return new ResourceRepresentation<>(
Option.none(), links, rels, namespaceManager, newValue, resources);
} | class class_name[name] begin[{]
method[withValue, return_type[type[ResourceRepresentation]], modifier[public], parameter[newValue]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=none, postfix_operators=[], prefix_operators=[], qualifier=Option, selectors=[], type_arguments=None), MemberReference(member=links, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=namespaceManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ResourceRepresentation, sub_type=None))]
end[}]
END[}] | Keyword[public] operator[<] identifier[R] operator[>] identifier[ResourceRepresentation] operator[<] identifier[R] operator[>] identifier[withValue] operator[SEP] identifier[R] identifier[newValue] operator[SEP] {
Keyword[return] Keyword[new] identifier[ResourceRepresentation] operator[<] operator[>] operator[SEP] identifier[Option] operator[SEP] identifier[none] operator[SEP] operator[SEP] , identifier[links] , identifier[rels] , identifier[namespaceManager] , identifier[newValue] , identifier[resources] operator[SEP] operator[SEP]
}
|
@Override
protected <T> CompletableFuture<T> doExecute(Command<T> command) throws Exception {
final CompletableFuture<T> future = new CompletableFuture<>();
executor.execute(() -> {
try {
future.complete(blockingExecute(command));
} catch (Throwable t) {
future.completeExceptionally(t);
}
});
return future;
} | class class_name[name] begin[{]
method[doExecute, return_type[type[CompletableFuture]], modifier[protected], parameter[command]] begin[{]
local_variable[type[CompletableFuture], future]
call[executor.execute, parameter[LambdaExpression(body=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=blockingExecute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=complete, postfix_operators=[], prefix_operators=[], qualifier=future, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=completeExceptionally, postfix_operators=[], prefix_operators=[], qualifier=future, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None)], parameters=[])]]
return[member[.future]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[protected] operator[<] identifier[T] operator[>] identifier[CompletableFuture] operator[<] identifier[T] operator[>] identifier[doExecute] operator[SEP] identifier[Command] operator[<] identifier[T] operator[>] identifier[command] operator[SEP] Keyword[throws] identifier[Exception] {
Keyword[final] identifier[CompletableFuture] operator[<] identifier[T] operator[>] identifier[future] operator[=] Keyword[new] identifier[CompletableFuture] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[executor] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] operator[->] {
Keyword[try] {
identifier[future] operator[SEP] identifier[complete] operator[SEP] identifier[blockingExecute] operator[SEP] identifier[command] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] {
identifier[future] operator[SEP] identifier[completeExceptionally] operator[SEP] identifier[t] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] Keyword[return] identifier[future] operator[SEP]
}
|
public static Point transform (float x, float y, float sx, float sy, float sina, float cosa,
float tx, float ty, Point result) {
return result.set((x*cosa - y*sina) * sx + tx, (x*sina + y*cosa) * sy + ty);
} | class class_name[name] begin[{]
method[transform, return_type[type[Point]], modifier[public static], parameter[x, y, sx, sy, sina, cosa, tx, ty, result]] begin[{]
return[call[result.set, parameter[binary_operation[binary_operation[binary_operation[binary_operation[member[.x], *, member[.cosa]], -, binary_operation[member[.y], *, member[.sina]]], *, member[.sx]], +, member[.tx]], binary_operation[binary_operation[binary_operation[binary_operation[member[.x], *, member[.sina]], +, binary_operation[member[.y], *, member[.cosa]]], *, member[.sy]], +, member[.ty]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Point] identifier[transform] operator[SEP] Keyword[float] identifier[x] , Keyword[float] identifier[y] , Keyword[float] identifier[sx] , Keyword[float] identifier[sy] , Keyword[float] identifier[sina] , Keyword[float] identifier[cosa] , Keyword[float] identifier[tx] , Keyword[float] identifier[ty] , identifier[Point] identifier[result] operator[SEP] {
Keyword[return] identifier[result] operator[SEP] identifier[set] operator[SEP] operator[SEP] identifier[x] operator[*] identifier[cosa] operator[-] identifier[y] operator[*] identifier[sina] operator[SEP] operator[*] identifier[sx] operator[+] identifier[tx] , operator[SEP] identifier[x] operator[*] identifier[sina] operator[+] identifier[y] operator[*] identifier[cosa] operator[SEP] operator[*] identifier[sy] operator[+] identifier[ty] operator[SEP] operator[SEP]
}
|
private void checkString(String string) {
if (CmsStringUtil.isEmptyOrWhitespaceOnly(string)) {
throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_EMPTY_STRING_0));
}
} | class class_name[name] begin[{]
method[checkString, return_type[void], modifier[private], parameter[string]] begin[{]
if[call[CmsStringUtil.isEmptyOrWhitespaceOnly, parameter[member[.string]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[MemberReference(member=ERR_EMPTY_STRING_0, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[])], member=container, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmsIllegalArgumentException, sub_type=None)), label=None)
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[checkString] operator[SEP] identifier[String] identifier[string] operator[SEP] {
Keyword[if] operator[SEP] identifier[CmsStringUtil] operator[SEP] identifier[isEmptyOrWhitespaceOnly] operator[SEP] identifier[string] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[CmsIllegalArgumentException] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[container] operator[SEP] identifier[Messages] operator[SEP] identifier[ERR_EMPTY_STRING_0] operator[SEP] operator[SEP] operator[SEP]
}
}
|
public byte[] toByteArray() {
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(this);
return baos.toByteArray();
} catch (IOException e) {
throw E.ioException(e);
}
} | class class_name[name] begin[{]
method[toByteArray, return_type[type[byte]], modifier[public], parameter[]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayOutputStream, sub_type=None)), name=baos)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteArrayOutputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=baos, 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=ObjectOutputStream, sub_type=None)), name=oos)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ObjectOutputStream, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=writeObject, postfix_operators=[], prefix_operators=[], qualifier=oos, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=baos, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ioException, postfix_operators=[], prefix_operators=[], qualifier=E, selectors=[], type_arguments=None), 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[byte] operator[SEP] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] {
Keyword[try] {
identifier[ByteArrayOutputStream] identifier[baos] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[ObjectOutputStream] identifier[oos] operator[=] Keyword[new] identifier[ObjectOutputStream] operator[SEP] identifier[baos] operator[SEP] operator[SEP] identifier[oos] operator[SEP] identifier[writeObject] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[return] identifier[baos] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] {
Keyword[throw] identifier[E] operator[SEP] identifier[ioException] operator[SEP] identifier[e] operator[SEP] operator[SEP]
}
}
|
public static <I, O> ListenableFuture<O> transformAsync(
final ListenableFuture<I> inFuture,
final Function<I, ListenableFuture<O>> transform
)
{
final SettableFuture<O> finalFuture = SettableFuture.create();
Futures.addCallback(inFuture, new FutureCallback<I>()
{
@Override
public void onSuccess(@Nullable I result)
{
final ListenableFuture<O> transformFuture = transform.apply(result);
Futures.addCallback(transformFuture, new FutureCallback<O>()
{
@Override
public void onSuccess(@Nullable O result)
{
finalFuture.set(result);
}
@Override
public void onFailure(Throwable t)
{
finalFuture.setException(t);
}
});
}
@Override
public void onFailure(Throwable t)
{
finalFuture.setException(t);
}
});
return finalFuture;
} | class class_name[name] begin[{]
method[transformAsync, return_type[type[ListenableFuture]], modifier[public static], parameter[inFuture, transform]] begin[{]
local_variable[type[SettableFuture], finalFuture]
call[Futures.addCallback, parameter[member[.inFuture], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=transform, selectors=[], type_arguments=None), name=transformFuture)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=O, sub_type=None))], dimensions=[], name=ListenableFuture, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transformFuture, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=finalFuture, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onSuccess, parameters=[FormalParameter(annotations=[Annotation(element=None, name=Nullable)], modifiers=set(), name=result, type=ReferenceType(arguments=None, dimensions=[], name=O, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setException, postfix_operators=[], prefix_operators=[], qualifier=finalFuture, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onFailure, parameters=[FormalParameter(annotations=[], modifiers=set(), name=t, type=ReferenceType(arguments=None, dimensions=[], name=Throwable, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=O, sub_type=None))], dimensions=None, name=FutureCallback, sub_type=None))], member=addCallback, postfix_operators=[], prefix_operators=[], qualifier=Futures, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onSuccess, parameters=[FormalParameter(annotations=[Annotation(element=None, name=Nullable)], modifiers=set(), name=result, type=ReferenceType(arguments=None, dimensions=[], name=I, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setException, postfix_operators=[], prefix_operators=[], qualifier=finalFuture, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onFailure, parameters=[FormalParameter(annotations=[], modifiers=set(), name=t, type=ReferenceType(arguments=None, dimensions=[], name=Throwable, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=I, sub_type=None))], dimensions=None, name=FutureCallback, sub_type=None))]]
return[member[.finalFuture]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[I] , identifier[O] operator[>] identifier[ListenableFuture] operator[<] identifier[O] operator[>] identifier[transformAsync] operator[SEP] Keyword[final] identifier[ListenableFuture] operator[<] identifier[I] operator[>] identifier[inFuture] , Keyword[final] identifier[Function] operator[<] identifier[I] , identifier[ListenableFuture] operator[<] identifier[O] operator[>] operator[>] identifier[transform] operator[SEP] {
Keyword[final] identifier[SettableFuture] operator[<] identifier[O] operator[>] identifier[finalFuture] operator[=] identifier[SettableFuture] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] identifier[Futures] operator[SEP] identifier[addCallback] operator[SEP] identifier[inFuture] , Keyword[new] identifier[FutureCallback] operator[<] identifier[I] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onSuccess] operator[SEP] annotation[@] identifier[Nullable] identifier[I] identifier[result] operator[SEP] {
Keyword[final] identifier[ListenableFuture] operator[<] identifier[O] operator[>] identifier[transformFuture] operator[=] identifier[transform] operator[SEP] identifier[apply] operator[SEP] identifier[result] operator[SEP] operator[SEP] identifier[Futures] operator[SEP] identifier[addCallback] operator[SEP] identifier[transformFuture] , Keyword[new] identifier[FutureCallback] operator[<] identifier[O] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onSuccess] operator[SEP] annotation[@] identifier[Nullable] identifier[O] identifier[result] operator[SEP] {
identifier[finalFuture] operator[SEP] identifier[set] operator[SEP] identifier[result] operator[SEP] operator[SEP]
} annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onFailure] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] {
identifier[finalFuture] operator[SEP] identifier[setException] operator[SEP] identifier[t] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP]
} annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onFailure] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] {
identifier[finalFuture] operator[SEP] identifier[setException] operator[SEP] identifier[t] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP] Keyword[return] identifier[finalFuture] operator[SEP]
}
|
public void marshall(DescribeVirtualGatewaysRequest describeVirtualGatewaysRequest, ProtocolMarshaller protocolMarshaller) {
if (describeVirtualGatewaysRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
} 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[describeVirtualGatewaysRequest, protocolMarshaller]] begin[{]
if[binary_operation[member[.describeVirtualGatewaysRequest], ==, 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=[], 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[DescribeVirtualGatewaysRequest] identifier[describeVirtualGatewaysRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] {
Keyword[if] operator[SEP] identifier[describeVirtualGatewaysRequest] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[try] {
}
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]
}
}
|
@Transactional(readOnly = true)
public Contact getRandomContact() {
logger.debug("Returning random contact");
Random rnd = new Random();
List<Contact> contacts = contactDao.findAll();
int getNumber = rnd.nextInt(contacts.size());
return contacts.get(getNumber);
} | class class_name[name] begin[{]
method[getRandomContact, return_type[type[Contact]], modifier[public], parameter[]] begin[{]
call[logger.debug, parameter[literal["Returning random contact"]]]
local_variable[type[Random], rnd]
local_variable[type[List], contacts]
local_variable[type[int], getNumber]
return[call[contacts.get, parameter[member[.getNumber]]]]
end[}]
END[}] | annotation[@] identifier[Transactional] operator[SEP] identifier[readOnly] operator[=] literal[boolean] operator[SEP] Keyword[public] identifier[Contact] identifier[getRandomContact] operator[SEP] operator[SEP] {
identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Random] identifier[rnd] operator[=] Keyword[new] identifier[Random] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Contact] operator[>] identifier[contacts] operator[=] identifier[contactDao] operator[SEP] identifier[findAll] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[getNumber] operator[=] identifier[rnd] operator[SEP] identifier[nextInt] operator[SEP] identifier[contacts] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[contacts] operator[SEP] identifier[get] operator[SEP] identifier[getNumber] operator[SEP] operator[SEP]
}
|
public static <T extends Configuration<T>, U extends ValidationProvider<T>> //
ProviderSpecificBootstrap<T> //
byProvider(final Class<U> providerType) {
throw new UnsupportedOperationException(
"GWT Validation does not support custom validator " + "providers");
} | class class_name[name] begin[{]
method[byProvider, return_type[type[ProviderSpecificBootstrap]], modifier[public static], parameter[providerType]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="GWT Validation does not support custom validator "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="providers"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnsupportedOperationException, sub_type=None)), label=None)
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Configuration] operator[<] identifier[T] operator[>] , identifier[U] Keyword[extends] identifier[ValidationProvider] operator[<] identifier[T] operator[>] operator[>] identifier[ProviderSpecificBootstrap] operator[<] identifier[T] operator[>] identifier[byProvider] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[U] operator[>] identifier[providerType] operator[SEP] {
Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP]
}
|
public static RandomVariable bachelierOptionValue(
RandomVariable forward,
RandomVariable volatility,
double optionMaturity,
double optionStrike,
RandomVariable payoffUnit)
{
if(optionMaturity < 0) {
return forward.mult(0.0);
}
else
{
RandomVariable integratedVolatility = volatility.mult(Math.sqrt(optionMaturity));
RandomVariable dPlus = forward.sub(optionStrike).div(integratedVolatility);
RandomVariable valueAnalytic = dPlus.apply(NormalDistribution::cumulativeDistribution).mult(forward.sub(optionStrike))
.add(dPlus.apply(NormalDistribution::density).mult(integratedVolatility)).mult(payoffUnit);
return valueAnalytic;
}
} | class class_name[name] begin[{]
method[bachelierOptionValue, return_type[type[RandomVariable]], modifier[public static], parameter[forward, volatility, optionMaturity, optionStrike, payoffUnit]] begin[{]
if[binary_operation[member[.optionMaturity], <, literal[0]]] begin[{]
return[call[forward.mult, parameter[literal[0.0]]]]
else begin[{]
local_variable[type[RandomVariable], integratedVolatility]
local_variable[type[RandomVariable], dPlus]
local_variable[type[RandomVariable], valueAnalytic]
return[member[.valueAnalytic]]
end[}]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[RandomVariable] identifier[bachelierOptionValue] operator[SEP] identifier[RandomVariable] identifier[forward] , identifier[RandomVariable] identifier[volatility] , Keyword[double] identifier[optionMaturity] , Keyword[double] identifier[optionStrike] , identifier[RandomVariable] identifier[payoffUnit] operator[SEP] {
Keyword[if] operator[SEP] identifier[optionMaturity] operator[<] Other[0] operator[SEP] {
Keyword[return] identifier[forward] operator[SEP] identifier[mult] operator[SEP] literal[Float] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[RandomVariable] identifier[integratedVolatility] operator[=] identifier[volatility] operator[SEP] identifier[mult] operator[SEP] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[optionMaturity] operator[SEP] operator[SEP] operator[SEP] identifier[RandomVariable] identifier[dPlus] operator[=] identifier[forward] operator[SEP] identifier[sub] operator[SEP] identifier[optionStrike] operator[SEP] operator[SEP] identifier[div] operator[SEP] identifier[integratedVolatility] operator[SEP] operator[SEP] identifier[RandomVariable] identifier[valueAnalytic] operator[=] identifier[dPlus] operator[SEP] identifier[apply] operator[SEP] identifier[NormalDistribution] operator[::] identifier[cumulativeDistribution] operator[SEP] operator[SEP] identifier[mult] operator[SEP] identifier[forward] operator[SEP] identifier[sub] operator[SEP] identifier[optionStrike] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[dPlus] operator[SEP] identifier[apply] operator[SEP] identifier[NormalDistribution] operator[::] identifier[density] operator[SEP] operator[SEP] identifier[mult] operator[SEP] identifier[integratedVolatility] operator[SEP] operator[SEP] operator[SEP] identifier[mult] operator[SEP] identifier[payoffUnit] operator[SEP] operator[SEP] Keyword[return] identifier[valueAnalytic] operator[SEP]
}
}
|
public synchronized PluralizerRegistry copy() {
PluralizerRegistry r = new PluralizerRegistry(control);
r.pluralizers.putAll(pluralizers);
return r;
} | class class_name[name] begin[{]
method[copy, return_type[type[PluralizerRegistry]], modifier[synchronized public], parameter[]] begin[{]
local_variable[type[PluralizerRegistry], r]
call[r.pluralizers.putAll, parameter[member[.pluralizers]]]
return[member[.r]]
end[}]
END[}] | Keyword[public] Keyword[synchronized] identifier[PluralizerRegistry] identifier[copy] operator[SEP] operator[SEP] {
identifier[PluralizerRegistry] identifier[r] operator[=] Keyword[new] identifier[PluralizerRegistry] operator[SEP] identifier[control] operator[SEP] operator[SEP] identifier[r] operator[SEP] identifier[pluralizers] operator[SEP] identifier[putAll] operator[SEP] identifier[pluralizers] operator[SEP] operator[SEP] Keyword[return] identifier[r] operator[SEP]
}
|
private void readCentralDirectory(final ZipFileSliceReader zipFileSliceReader, final LogNode log)
throws IOException, InterruptedException {
// Scan for End Of Central Directory (EOCD) signature
long eocdPos = -1;
for (long i = len - 22; i >= 0; --i) {
if (zipFileSliceReader.getInt(i) == 0x06054b50) {
eocdPos = i;
break;
}
}
if (eocdPos < 0) {
throw new IOException("Jarfile central directory signature not found: " + getPath());
}
long numEnt = zipFileSliceReader.getShort(eocdPos + 8);
if (zipFileSliceReader.getShort(eocdPos + 4) > 0 || zipFileSliceReader.getShort(eocdPos + 6) > 0
|| numEnt != zipFileSliceReader.getShort(eocdPos + 10)) {
throw new IOException("Multi-disk jarfiles not supported: " + getPath());
}
long cenSize = zipFileSliceReader.getInt(eocdPos + 12);
if (cenSize > eocdPos) {
throw new IOException(
"Central directory size out of range: " + cenSize + " vs. " + eocdPos + ": " + getPath());
}
long cenOff = zipFileSliceReader.getInt(eocdPos + 16);
long cenPos = eocdPos - cenSize;
// Check for Zip64 End Of Central Directory Locator record
final long zip64cdLocIdx = eocdPos - 20;
if (zip64cdLocIdx >= 0 && zipFileSliceReader.getInt(zip64cdLocIdx) == 0x07064b50) {
if (zipFileSliceReader.getInt(zip64cdLocIdx + 4) > 0
|| zipFileSliceReader.getInt(zip64cdLocIdx + 16) > 1) {
throw new IOException("Multi-disk jarfiles not supported: " + getPath());
}
final long eocdPos64 = zipFileSliceReader.getLong(zip64cdLocIdx + 8);
if (zipFileSliceReader.getInt(eocdPos64) != 0x06064b50) {
throw new IOException("Zip64 central directory at location " + eocdPos64
+ " does not have Zip64 central directory header: " + getPath());
}
final long numEnt64 = zipFileSliceReader.getLong(eocdPos64 + 24);
if (zipFileSliceReader.getInt(eocdPos64 + 16) > 0 || zipFileSliceReader.getInt(eocdPos64 + 20) > 0
|| numEnt64 != zipFileSliceReader.getLong(eocdPos64 + 32)) {
throw new IOException("Multi-disk jarfiles not supported: " + getPath());
}
if (numEnt != numEnt64 && numEnt != 0xffff) {
// Entry size mismatch -- trigger manual counting of entries
numEnt = -1L;
} else {
numEnt = numEnt64;
}
final long cenSize64 = zipFileSliceReader.getLong(eocdPos64 + 40);
if (cenSize != cenSize64 && cenSize != 0xffffffff) {
throw new IOException(
"Mismatch in central directory size: " + cenSize + " vs. " + cenSize64 + ": " + getPath());
}
cenSize = cenSize64;
// Recalculate the central directory position
cenPos = eocdPos64 - cenSize;
final long cenOff64 = zipFileSliceReader.getLong(eocdPos64 + 48);
if (cenOff != cenOff64 && cenOff != 0xffffffff) {
throw new IOException(
"Mismatch in central directory offset: " + cenOff + " vs. " + cenOff64 + ": " + getPath());
}
cenOff = cenOff64;
}
// Get offset of first local file header
final long locPos = cenPos - cenOff;
if (locPos < 0) {
throw new IOException("Local file header offset out of range: " + locPos + ": " + getPath());
}
// Read entries into a byte array, if central directory is smaller than 2GB. If central directory
// is larger than 2GB, need to read each entry field from the file directly using ZipFileSliceReader.
final byte[] entryBytes = cenSize > FileUtils.MAX_BUFFER_SIZE ? null : new byte[(int) cenSize];
if (entryBytes != null) {
zipFileSliceReader.read(cenPos, entryBytes, 0, (int) cenSize);
}
if (numEnt == -1L) {
// numEnt and numEnt64 were inconsistent -- manually count entries
numEnt = 0;
for (long entOff = 0; entOff + 46 <= cenSize;) {
final int sig = entryBytes != null ? ZipFileSliceReader.getInt(entryBytes, entOff)
: zipFileSliceReader.getInt(cenPos + entOff);
if (sig != 0x02014b50) {
throw new IOException("Invalid central directory signature: 0x" + Integer.toString(sig, 16)
+ ": " + getPath());
}
final int filenameLen = entryBytes != null ? ZipFileSliceReader.getShort(entryBytes, entOff + 28)
: zipFileSliceReader.getShort(cenPos + entOff + 28);
final int extraFieldLen = entryBytes != null ? ZipFileSliceReader.getShort(entryBytes, entOff + 30)
: zipFileSliceReader.getShort(cenPos + entOff + 30);
final int commentLen = entryBytes != null ? ZipFileSliceReader.getShort(entryBytes, entOff + 32)
: zipFileSliceReader.getShort(cenPos + entOff + 32);
entOff += 46 + filenameLen + extraFieldLen + commentLen;
numEnt++;
}
}
// Can't have more than (Integer.MAX_VALUE - 8) entries, since they are stored in an ArrayList
if (numEnt > FileUtils.MAX_BUFFER_SIZE) {
// One alternative in this (impossibly rare) situation would be to return only the first 2B entries
throw new IOException("Too many zipfile entries: " + numEnt);
}
// Make sure there's no DoS attack vector by using a fake number of entries
if (entryBytes != null && numEnt > entryBytes.length / 46) {
// The smallest directory entry is 46 bytes in size
throw new IOException("Too many zipfile entries: " + numEnt + " (expected a max of "
+ entryBytes.length / 46 + " based on central directory size)");
}
// Enumerate entries
entries = new ArrayList<>((int) numEnt);
FastZipEntry manifestZipEntry = null;
try {
int entSize = 0;
for (long entOff = 0; entOff + 46 <= cenSize; entOff += entSize) {
final int sig = entryBytes != null ? ZipFileSliceReader.getInt(entryBytes, entOff)
: zipFileSliceReader.getInt(cenPos + entOff);
if (sig != 0x02014b50) {
throw new IOException("Invalid central directory signature: 0x" + Integer.toString(sig, 16)
+ ": " + getPath());
}
final int filenameLen = entryBytes != null ? ZipFileSliceReader.getShort(entryBytes, entOff + 28)
: zipFileSliceReader.getShort(cenPos + entOff + 28);
final int extraFieldLen = entryBytes != null ? ZipFileSliceReader.getShort(entryBytes, entOff + 30)
: zipFileSliceReader.getShort(cenPos + entOff + 30);
final int commentLen = entryBytes != null ? ZipFileSliceReader.getShort(entryBytes, entOff + 32)
: zipFileSliceReader.getShort(cenPos + entOff + 32);
entSize = 46 + filenameLen + extraFieldLen + commentLen;
// Get and sanitize entry name
final long filenameStartOff = entOff + 46;
final long filenameEndOff = filenameStartOff + filenameLen;
if (filenameEndOff > cenSize) {
if (log != null) {
log.log("Filename extends past end of entry -- skipping entry at offset " + entOff);
}
break;
}
final String entryName = entryBytes != null
? ZipFileSliceReader.getString(entryBytes, filenameStartOff, filenameLen)
: zipFileSliceReader.getString(cenPos + filenameStartOff, filenameLen);
final String entryNameSanitized = FileUtils.sanitizeEntryPath(entryName,
/* removeInitialSlash = */ true);
if (entryNameSanitized.isEmpty() || entryName.endsWith("/")) {
// Skip directory entries
continue;
}
// Check entry flag bits
final int flags = entryBytes != null ? ZipFileSliceReader.getShort(entryBytes, entOff + 8)
: zipFileSliceReader.getShort(cenPos + entOff + 8);
if ((flags & 1) != 0) {
if (log != null) {
log.log("Skipping encrypted zip entry: " + entryNameSanitized);
}
continue;
}
// Check compression method
final int compressionMethod = entryBytes != null
? ZipFileSliceReader.getShort(entryBytes, entOff + 10)
: zipFileSliceReader.getShort(cenPos + entOff + 10);
if (compressionMethod != /* stored */ 0 && compressionMethod != /* deflated */ 8) {
if (log != null) {
log.log("Skipping zip entry with invalid compression method " + compressionMethod + ": "
+ entryNameSanitized);
}
continue;
}
final boolean isDeflated = compressionMethod == /* deflated */ 8;
// Get compressed and uncompressed size
long compressedSize = entryBytes != null ? ZipFileSliceReader.getInt(entryBytes, entOff + 20)
: zipFileSliceReader.getInt(cenPos + entOff + 20);
long uncompressedSize = entryBytes != null ? ZipFileSliceReader.getInt(entryBytes, entOff + 24)
: zipFileSliceReader.getInt(cenPos + entOff + 24);
long pos = entryBytes != null ? ZipFileSliceReader.getInt(entryBytes, entOff + 42)
: zipFileSliceReader.getInt(cenPos + entOff + 42);
// Check for Zip64 header in extra fields
if (extraFieldLen > 0) {
for (int extraFieldOff = 0; extraFieldOff + 4 < extraFieldLen;) {
final long tagOff = filenameEndOff + extraFieldOff;
final int tag = entryBytes != null ? ZipFileSliceReader.getShort(entryBytes, tagOff)
: zipFileSliceReader.getShort(cenPos + tagOff);
final int size = entryBytes != null ? ZipFileSliceReader.getShort(entryBytes, tagOff + 2)
: zipFileSliceReader.getShort(cenPos + tagOff + 2);
if (extraFieldOff + 4 + size > extraFieldLen) {
// Invalid size
break;
}
if (tag == /* EXTID_ZIP64 */ 1 && size >= 24) {
final long uncompressedSizeL = entryBytes != null
? ZipFileSliceReader.getLong(entryBytes, tagOff + 4 + 0)
: zipFileSliceReader.getLong(cenPos + tagOff + 4 + 0);
if (uncompressedSize == 0xffffffff) {
uncompressedSize = uncompressedSizeL;
}
final long compressedSizeL = entryBytes != null
? ZipFileSliceReader.getLong(entryBytes, tagOff + 4 + 8)
: zipFileSliceReader.getLong(cenPos + tagOff + 4 + 8);
if (compressedSize == 0xffffffff) {
compressedSize = compressedSizeL;
}
final long posL = entryBytes != null
? ZipFileSliceReader.getLong(entryBytes, tagOff + 4 + 16)
: zipFileSliceReader.getLong(cenPos + tagOff + 4 + 16);
if (pos == 0xffffffff) {
pos = posL;
}
break;
}
extraFieldOff += 4 + size;
}
}
if (compressedSize < 0 || pos < 0) {
continue;
}
final long locHeaderPos = locPos + pos;
if (locHeaderPos < 0) {
if (log != null) {
log.log("Skipping zip entry with invalid loc header position: " + entryNameSanitized);
}
continue;
}
if (locHeaderPos + 4 >= len) {
if (log != null) {
log.log("Unexpected EOF when trying to read LOC header: " + entryNameSanitized);
}
continue;
}
// Add zip entry
final FastZipEntry entry = new FastZipEntry(this, locHeaderPos, entryNameSanitized, isDeflated,
compressedSize, uncompressedSize, physicalZipFile.nestedJarHandler);
entries.add(entry);
// Record manifest entry
if (entry.entryName.equals(MANIFEST_PATH)) {
manifestZipEntry = entry;
}
}
} catch (EOFException | IndexOutOfBoundsException e) {
// Stop reading entries if any entry is not within file
if (log != null) {
log.log("Reached premature EOF"
+ (entries.isEmpty() ? "" : " after reading zip entry " + entries.get(entries.size() - 1)));
}
}
// Parse manifest file, if present
if (manifestZipEntry != null) {
parseManifest(manifestZipEntry, log);
}
// For multi-release jars, drop any older or non-versioned entries that are masked by the most recent
// version-specific entry
if (isMultiReleaseJar) {
if (VersionFinder.JAVA_MAJOR_VERSION < 9) {
if (log != null) {
log.log("This is a multi-release jar, but JRE version " + VersionFinder.JAVA_MAJOR_VERSION
+ " does not support multi-release jars");
}
} else {
if (log != null) {
// Find all the unique multirelease versions within the jar
final Set<Integer> versionsFound = new HashSet<>();
for (final FastZipEntry entry : entries) {
if (entry.version > 8) {
versionsFound.add(entry.version);
}
}
final List<Integer> versionsFoundSorted = new ArrayList<>(versionsFound);
CollectionUtils.sortIfNotEmpty(versionsFoundSorted);
log.log("This is a multi-release jar, with versions: " + Join.join(", ", versionsFoundSorted));
}
// Sort in decreasing order of version in preparation for version masking
CollectionUtils.sortIfNotEmpty(entries);
// Mask files that appear in multiple version sections, so that there is only one entry
// for each unversioned path, i.e. the versioned path with the highest version number
final List<FastZipEntry> unversionedZipEntriesMasked = new ArrayList<>(entries.size());
final Map<String, String> unversionedPathToVersionedPath = new HashMap<>();
for (final FastZipEntry versionedZipEntry : entries) {
if (!unversionedPathToVersionedPath.containsKey(versionedZipEntry.entryNameUnversioned)) {
// This is the first FastZipEntry for this entry's unversioned path
unversionedPathToVersionedPath.put(versionedZipEntry.entryNameUnversioned,
versionedZipEntry.entryName);
unversionedZipEntriesMasked.add(versionedZipEntry);
} else if (log != null) {
log.log(unversionedPathToVersionedPath.get(versionedZipEntry.entryNameUnversioned)
+ " masks " + versionedZipEntry.entryName);
}
}
// Override entries with version-masked entries
entries = unversionedZipEntriesMasked;
}
}
} | class class_name[name] begin[{]
method[readCentralDirectory, return_type[void], modifier[private], parameter[zipFileSliceReader, log]] begin[{]
local_variable[type[long], eocdPos]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x06054b50), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=eocdPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=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=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=22), operator=-), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=long)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[])]), label=None)
if[binary_operation[member[.eocdPos], <, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Jarfile central directory signature not found: "), operandr=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)
else begin[{]
None
end[}]
local_variable[type[long], numEnt]
if[binary_operation[binary_operation[binary_operation[call[zipFileSliceReader.getShort, parameter[binary_operation[member[.eocdPos], +, literal[4]]]], >, literal[0]], ||, binary_operation[call[zipFileSliceReader.getShort, parameter[binary_operation[member[.eocdPos], +, literal[6]]]], >, literal[0]]], ||, binary_operation[member[.numEnt], !=, call[zipFileSliceReader.getShort, parameter[binary_operation[member[.eocdPos], +, literal[10]]]]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Multi-disk jarfiles not supported: "), operandr=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)
else begin[{]
None
end[}]
local_variable[type[long], cenSize]
if[binary_operation[member[.cenSize], >, member[.eocdPos]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Central directory size out of range: "), operandr=MemberReference(member=cenSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" vs. "), operator=+), operandr=MemberReference(member=eocdPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)
else begin[{]
None
end[}]
local_variable[type[long], cenOff]
local_variable[type[long], cenPos]
local_variable[type[long], zip64cdLocIdx]
if[binary_operation[binary_operation[member[.zip64cdLocIdx], >=, literal[0]], &&, binary_operation[call[zipFileSliceReader.getInt, parameter[member[.zip64cdLocIdx]]], ==, literal[0x07064b50]]]] begin[{]
if[binary_operation[binary_operation[call[zipFileSliceReader.getInt, parameter[binary_operation[member[.zip64cdLocIdx], +, literal[4]]]], >, literal[0]], ||, binary_operation[call[zipFileSliceReader.getInt, parameter[binary_operation[member[.zip64cdLocIdx], +, literal[16]]]], >, literal[1]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Multi-disk jarfiles not supported: "), operandr=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)
else begin[{]
None
end[}]
local_variable[type[long], eocdPos64]
if[binary_operation[call[zipFileSliceReader.getInt, parameter[member[.eocdPos64]]], !=, literal[0x06064b50]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Zip64 central directory at location "), operandr=MemberReference(member=eocdPos64, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" does not have Zip64 central directory header: "), operator=+), operandr=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)
else begin[{]
None
end[}]
local_variable[type[long], numEnt64]
if[binary_operation[binary_operation[binary_operation[call[zipFileSliceReader.getInt, parameter[binary_operation[member[.eocdPos64], +, literal[16]]]], >, literal[0]], ||, binary_operation[call[zipFileSliceReader.getInt, parameter[binary_operation[member[.eocdPos64], +, literal[20]]]], >, literal[0]]], ||, binary_operation[member[.numEnt64], !=, call[zipFileSliceReader.getLong, parameter[binary_operation[member[.eocdPos64], +, literal[32]]]]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Multi-disk jarfiles not supported: "), operandr=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)
else begin[{]
None
end[}]
if[binary_operation[binary_operation[member[.numEnt], !=, member[.numEnt64]], &&, binary_operation[member[.numEnt], !=, literal[0xffff]]]] begin[{]
assign[member[.numEnt], literal[1L]]
else begin[{]
assign[member[.numEnt], member[.numEnt64]]
end[}]
local_variable[type[long], cenSize64]
if[binary_operation[binary_operation[member[.cenSize], !=, member[.cenSize64]], &&, binary_operation[member[.cenSize], !=, literal[0xffffffff]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Mismatch in central directory size: "), operandr=MemberReference(member=cenSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" vs. "), operator=+), operandr=MemberReference(member=cenSize64, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)
else begin[{]
None
end[}]
assign[member[.cenSize], member[.cenSize64]]
assign[member[.cenPos], binary_operation[member[.eocdPos64], -, member[.cenSize]]]
local_variable[type[long], cenOff64]
if[binary_operation[binary_operation[member[.cenOff], !=, member[.cenOff64]], &&, binary_operation[member[.cenOff], !=, literal[0xffffffff]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Mismatch in central directory offset: "), operandr=MemberReference(member=cenOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" vs. "), operator=+), operandr=MemberReference(member=cenOff64, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)
else begin[{]
None
end[}]
assign[member[.cenOff], member[.cenOff64]]
else begin[{]
None
end[}]
local_variable[type[long], locPos]
if[binary_operation[member[.locPos], <, literal[0]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Local file header offset out of range: "), operandr=MemberReference(member=locPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)
else begin[{]
None
end[}]
local_variable[type[byte], entryBytes]
if[binary_operation[member[.entryBytes], !=, literal[null]]] begin[{]
call[zipFileSliceReader.read, parameter[member[.cenPos], member[.entryBytes], literal[0], Cast(expression=MemberReference(member=cenSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))]]
else begin[{]
None
end[}]
if[binary_operation[member[.numEnt], ==, literal[1L]]] begin[{]
assign[member[.numEnt], literal[0]]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=sig)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=sig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x02014b50), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid central directory signature: 0x"), operandr=MethodInvocation(arguments=[MemberReference(member=sig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=28), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=28), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=filenameLen)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=extraFieldLen)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=commentLen)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=46), operandr=MemberReference(member=filenameLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=extraFieldLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=commentLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None), StatementExpression(expression=MemberReference(member=numEnt, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=46), operator=+), operandr=MemberReference(member=cenSize, 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=entOff)], modifiers=set(), type=BasicType(dimensions=[], name=long)), update=None), label=None)
else begin[{]
None
end[}]
if[binary_operation[member[.numEnt], >, member[FileUtils.MAX_BUFFER_SIZE]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Too many zipfile entries: "), operandr=MemberReference(member=numEnt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)
else begin[{]
None
end[}]
if[binary_operation[binary_operation[member[.entryBytes], !=, literal[null]], &&, binary_operation[member[.numEnt], >, binary_operation[member[entryBytes.length], /, literal[46]]]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Too many zipfile entries: "), operandr=MemberReference(member=numEnt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" (expected a max of "), operator=+), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=entryBytes, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=46), operator=/), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" based on central directory size)"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)
else begin[{]
None
end[}]
assign[member[.entries], ClassCreator(arguments=[Cast(expression=MemberReference(member=numEnt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))]
local_variable[type[FastZipEntry], manifestZipEntry]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=entSize)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=sig)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=sig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x02014b50), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid central directory signature: 0x"), operandr=MethodInvocation(arguments=[MemberReference(member=sig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=28), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=28), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=filenameLen)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=extraFieldLen)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=commentLen)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=entSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=46), operandr=MemberReference(member=filenameLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=extraFieldLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=commentLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=46), operator=+), name=filenameStartOff)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filenameStartOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=filenameLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=filenameEndOff)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=filenameEndOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=cenSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Filename extends past end of entry -- skipping entry at offset "), operandr=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=log, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=filenameStartOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=filenameLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filenameStartOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filenameLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=entryName)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=entryName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=sanitizeEntryPath, postfix_operators=[], prefix_operators=[], qualifier=FileUtils, selectors=[], type_arguments=None), name=entryNameSanitized)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=entryNameSanitized, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/")], member=endsWith, postfix_operators=[], prefix_operators=[], qualifier=entryName, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=flags)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=flags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Skipping encrypted zip entry: "), operandr=MemberReference(member=entryNameSanitized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=log, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=compressionMethod)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=compressionMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=compressionMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Skipping zip entry with invalid compression method "), operandr=MemberReference(member=compressionMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MemberReference(member=entryNameSanitized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=log, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=compressionMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator===), name=isDeflated)], modifiers={'final'}, type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=20), operator=+)], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=20), operator=+)], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=compressedSize)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=+)], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=+)], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=uncompressedSize)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=42), operator=+)], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=42), operator=+)], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=pos)], modifiers=set(), type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=extraFieldLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filenameEndOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=extraFieldOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=tagOff)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=tagOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tagOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=tag)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=tagOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=tagOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+)], member=getShort, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=size)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=extraFieldOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=extraFieldLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=tag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), operandr=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=>=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=tagOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=+)], member=getLong, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=tagOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=+)], member=getLong, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=uncompressedSizeL)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=uncompressedSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xffffffff), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=uncompressedSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=uncompressedSizeL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=tagOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=+)], member=getLong, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=tagOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=+)], member=getLong, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=compressedSizeL)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=compressedSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xffffffff), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=compressedSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=compressedSizeL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cenPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=tagOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=+)], member=getLong, postfix_operators=[], prefix_operators=[], qualifier=zipFileSliceReader, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=entryBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=tagOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=+)], member=getLong, postfix_operators=[], prefix_operators=[], qualifier=ZipFileSliceReader, selectors=[], type_arguments=None)), name=posL)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xffffffff), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=posL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), BreakStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=extraFieldOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=extraFieldOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+), operandr=MemberReference(member=extraFieldLen, 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=extraFieldOff)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=compressedSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=locPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=locHeaderPos)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=locHeaderPos, 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=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Skipping zip entry with invalid loc header position: "), operandr=MemberReference(member=entryNameSanitized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=log, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=locHeaderPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+), operandr=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unexpected EOF when trying to read LOC header: "), operandr=MemberReference(member=entryNameSanitized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=log, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=locHeaderPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=entryNameSanitized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isDeflated, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=compressedSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=uncompressedSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nestedJarHandler, postfix_operators=[], prefix_operators=[], qualifier=physicalZipFile, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FastZipEntry, sub_type=None)), name=entry)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FastZipEntry, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=entries, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=MANIFEST_PATH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=entry.entryName, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=manifestZipEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=46), operator=+), operandr=MemberReference(member=cenSize, 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=entOff)], modifiers=set(), type=BasicType(dimensions=[], name=long)), update=[Assignment(expressionl=MemberReference(member=entOff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=entSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Reached premature EOF"), operandr=TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=entries, selectors=[], type_arguments=None), if_false=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" after reading zip entry "), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=entries, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=get, postfix_operators=[], prefix_operators=[], qualifier=entries, selectors=[], type_arguments=None), operator=+), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")), operator=+)], member=log, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['EOFException', 'IndexOutOfBoundsException']))], finally_block=None, label=None, resources=None)
if[binary_operation[member[.manifestZipEntry], !=, literal[null]]] begin[{]
call[.parseManifest, parameter[member[.manifestZipEntry], member[.log]]]
else begin[{]
None
end[}]
if[member[.isMultiReleaseJar]] begin[{]
if[binary_operation[member[VersionFinder.JAVA_MAJOR_VERSION], <, literal[9]]] begin[{]
if[binary_operation[member[.log], !=, literal[null]]] begin[{]
call[log.log, parameter[binary_operation[binary_operation[literal["This is a multi-release jar, but JRE version "], +, member[VersionFinder.JAVA_MAJOR_VERSION]], +, literal[" does not support multi-release jars"]]]]
else begin[{]
None
end[}]
else begin[{]
if[binary_operation[member[.log], !=, literal[null]]] begin[{]
local_variable[type[Set], versionsFound]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=versionsFound, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=entries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FastZipEntry, sub_type=None))), label=None)
local_variable[type[List], versionsFoundSorted]
call[CollectionUtils.sortIfNotEmpty, parameter[member[.versionsFoundSorted]]]
call[log.log, parameter[binary_operation[literal["This is a multi-release jar, with versions: "], +, call[Join.join, parameter[literal[", "], member[.versionsFoundSorted]]]]]]
else begin[{]
None
end[}]
call[CollectionUtils.sortIfNotEmpty, parameter[member[.entries]]]
local_variable[type[List], unversionedZipEntriesMasked]
local_variable[type[Map], unversionedPathToVersionedPath]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=entryNameUnversioned, postfix_operators=[], prefix_operators=[], qualifier=versionedZipEntry, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=['!'], qualifier=unversionedPathToVersionedPath, selectors=[], type_arguments=None), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=entryNameUnversioned, postfix_operators=[], prefix_operators=[], qualifier=versionedZipEntry, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=unversionedPathToVersionedPath, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" masks "), operator=+), operandr=MemberReference(member=entryName, postfix_operators=[], prefix_operators=[], qualifier=versionedZipEntry, selectors=[]), operator=+)], member=log, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=entryNameUnversioned, postfix_operators=[], prefix_operators=[], qualifier=versionedZipEntry, selectors=[]), MemberReference(member=entryName, postfix_operators=[], prefix_operators=[], qualifier=versionedZipEntry, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=unversionedPathToVersionedPath, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=versionedZipEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=unversionedZipEntriesMasked, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=entries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=versionedZipEntry)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FastZipEntry, sub_type=None))), label=None)
assign[member[.entries], member[.unversionedZipEntriesMasked]]
end[}]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[readCentralDirectory] operator[SEP] Keyword[final] identifier[ZipFileSliceReader] identifier[zipFileSliceReader] , Keyword[final] identifier[LogNode] identifier[log] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InterruptedException] {
Keyword[long] identifier[eocdPos] operator[=] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[long] identifier[i] operator[=] identifier[len] operator[-] Other[22] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] operator[--] identifier[i] operator[SEP] {
Keyword[if] operator[SEP] identifier[zipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[i] operator[SEP] operator[==] literal[Integer] operator[SEP] {
identifier[eocdPos] operator[=] identifier[i] operator[SEP] Keyword[break] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[eocdPos] operator[<] Other[0] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[long] identifier[numEnt] operator[=] identifier[zipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[eocdPos] operator[+] Other[8] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[zipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[eocdPos] operator[+] Other[4] operator[SEP] operator[>] Other[0] operator[||] identifier[zipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[eocdPos] operator[+] Other[6] operator[SEP] operator[>] Other[0] operator[||] identifier[numEnt] operator[!=] identifier[zipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[eocdPos] operator[+] Other[10] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[long] identifier[cenSize] operator[=] identifier[zipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[eocdPos] operator[+] Other[12] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cenSize] operator[>] identifier[eocdPos] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[cenSize] operator[+] literal[String] operator[+] identifier[eocdPos] operator[+] literal[String] operator[+] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[long] identifier[cenOff] operator[=] identifier[zipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[eocdPos] operator[+] Other[16] operator[SEP] operator[SEP] Keyword[long] identifier[cenPos] operator[=] identifier[eocdPos] operator[-] identifier[cenSize] operator[SEP] Keyword[final] Keyword[long] identifier[zip64cdLocIdx] operator[=] identifier[eocdPos] operator[-] Other[20] operator[SEP] Keyword[if] operator[SEP] identifier[zip64cdLocIdx] operator[>=] Other[0] operator[&&] identifier[zipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[zip64cdLocIdx] operator[SEP] operator[==] literal[Integer] operator[SEP] {
Keyword[if] operator[SEP] identifier[zipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[zip64cdLocIdx] operator[+] Other[4] operator[SEP] operator[>] Other[0] operator[||] identifier[zipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[zip64cdLocIdx] operator[+] Other[16] operator[SEP] operator[>] Other[1] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[final] Keyword[long] identifier[eocdPos64] operator[=] identifier[zipFileSliceReader] operator[SEP] identifier[getLong] operator[SEP] identifier[zip64cdLocIdx] operator[+] Other[8] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[zipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[eocdPos64] operator[SEP] operator[!=] literal[Integer] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[eocdPos64] operator[+] literal[String] operator[+] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[final] Keyword[long] identifier[numEnt64] operator[=] identifier[zipFileSliceReader] operator[SEP] identifier[getLong] operator[SEP] identifier[eocdPos64] operator[+] Other[24] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[zipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[eocdPos64] operator[+] Other[16] operator[SEP] operator[>] Other[0] operator[||] identifier[zipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[eocdPos64] operator[+] Other[20] operator[SEP] operator[>] Other[0] operator[||] identifier[numEnt64] operator[!=] identifier[zipFileSliceReader] operator[SEP] identifier[getLong] operator[SEP] identifier[eocdPos64] operator[+] Other[32] operator[SEP] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[numEnt] operator[!=] identifier[numEnt64] operator[&&] identifier[numEnt] operator[!=] literal[Integer] operator[SEP] {
identifier[numEnt] operator[=] operator[-] Other[1L] operator[SEP]
}
Keyword[else] {
identifier[numEnt] operator[=] identifier[numEnt64] operator[SEP]
}
Keyword[final] Keyword[long] identifier[cenSize64] operator[=] identifier[zipFileSliceReader] operator[SEP] identifier[getLong] operator[SEP] identifier[eocdPos64] operator[+] Other[40] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cenSize] operator[!=] identifier[cenSize64] operator[&&] identifier[cenSize] operator[!=] literal[Integer] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[cenSize] operator[+] literal[String] operator[+] identifier[cenSize64] operator[+] literal[String] operator[+] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
identifier[cenSize] operator[=] identifier[cenSize64] operator[SEP] identifier[cenPos] operator[=] identifier[eocdPos64] operator[-] identifier[cenSize] operator[SEP] Keyword[final] Keyword[long] identifier[cenOff64] operator[=] identifier[zipFileSliceReader] operator[SEP] identifier[getLong] operator[SEP] identifier[eocdPos64] operator[+] Other[48] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cenOff] operator[!=] identifier[cenOff64] operator[&&] identifier[cenOff] operator[!=] literal[Integer] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[cenOff] operator[+] literal[String] operator[+] identifier[cenOff64] operator[+] literal[String] operator[+] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
identifier[cenOff] operator[=] identifier[cenOff64] operator[SEP]
}
Keyword[final] Keyword[long] identifier[locPos] operator[=] identifier[cenPos] operator[-] identifier[cenOff] operator[SEP] Keyword[if] operator[SEP] identifier[locPos] operator[<] Other[0] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[locPos] operator[+] literal[String] operator[+] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[entryBytes] operator[=] identifier[cenSize] operator[>] identifier[FileUtils] operator[SEP] identifier[MAX_BUFFER_SIZE] operator[?] Other[null] operator[:] Keyword[new] Keyword[byte] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[cenSize] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entryBytes] operator[!=] Other[null] operator[SEP] {
identifier[zipFileSliceReader] operator[SEP] identifier[read] operator[SEP] identifier[cenPos] , identifier[entryBytes] , Other[0] , operator[SEP] Keyword[int] operator[SEP] identifier[cenSize] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[numEnt] operator[==] operator[-] Other[1L] operator[SEP] {
identifier[numEnt] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[long] identifier[entOff] operator[=] Other[0] operator[SEP] identifier[entOff] operator[+] Other[46] operator[<=] identifier[cenSize] operator[SEP] operator[SEP] {
Keyword[final] Keyword[int] identifier[sig] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[entryBytes] , identifier[entOff] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[cenPos] operator[+] identifier[entOff] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sig] operator[!=] literal[Integer] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[Integer] operator[SEP] identifier[toString] operator[SEP] identifier[sig] , Other[16] operator[SEP] operator[+] literal[String] operator[+] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[final] Keyword[int] identifier[filenameLen] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[entryBytes] , identifier[entOff] operator[+] Other[28] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[cenPos] operator[+] identifier[entOff] operator[+] Other[28] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[extraFieldLen] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[entryBytes] , identifier[entOff] operator[+] Other[30] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[cenPos] operator[+] identifier[entOff] operator[+] Other[30] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[commentLen] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[entryBytes] , identifier[entOff] operator[+] Other[32] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[cenPos] operator[+] identifier[entOff] operator[+] Other[32] operator[SEP] operator[SEP] identifier[entOff] operator[+=] Other[46] operator[+] identifier[filenameLen] operator[+] identifier[extraFieldLen] operator[+] identifier[commentLen] operator[SEP] identifier[numEnt] operator[++] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[numEnt] operator[>] identifier[FileUtils] operator[SEP] identifier[MAX_BUFFER_SIZE] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[numEnt] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[entryBytes] operator[!=] Other[null] operator[&&] identifier[numEnt] operator[>] identifier[entryBytes] operator[SEP] identifier[length] operator[/] Other[46] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[numEnt] operator[+] literal[String] operator[+] identifier[entryBytes] operator[SEP] identifier[length] operator[/] Other[46] operator[+] literal[String] operator[SEP] operator[SEP]
}
identifier[entries] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[numEnt] operator[SEP] operator[SEP] identifier[FastZipEntry] identifier[manifestZipEntry] operator[=] Other[null] operator[SEP] Keyword[try] {
Keyword[int] identifier[entSize] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[long] identifier[entOff] operator[=] Other[0] operator[SEP] identifier[entOff] operator[+] Other[46] operator[<=] identifier[cenSize] operator[SEP] identifier[entOff] operator[+=] identifier[entSize] operator[SEP] {
Keyword[final] Keyword[int] identifier[sig] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[entryBytes] , identifier[entOff] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[cenPos] operator[+] identifier[entOff] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sig] operator[!=] literal[Integer] operator[SEP] {
Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[Integer] operator[SEP] identifier[toString] operator[SEP] identifier[sig] , Other[16] operator[SEP] operator[+] literal[String] operator[+] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[final] Keyword[int] identifier[filenameLen] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[entryBytes] , identifier[entOff] operator[+] Other[28] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[cenPos] operator[+] identifier[entOff] operator[+] Other[28] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[extraFieldLen] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[entryBytes] , identifier[entOff] operator[+] Other[30] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[cenPos] operator[+] identifier[entOff] operator[+] Other[30] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[commentLen] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[entryBytes] , identifier[entOff] operator[+] Other[32] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[cenPos] operator[+] identifier[entOff] operator[+] Other[32] operator[SEP] operator[SEP] identifier[entSize] operator[=] Other[46] operator[+] identifier[filenameLen] operator[+] identifier[extraFieldLen] operator[+] identifier[commentLen] operator[SEP] Keyword[final] Keyword[long] identifier[filenameStartOff] operator[=] identifier[entOff] operator[+] Other[46] operator[SEP] Keyword[final] Keyword[long] identifier[filenameEndOff] operator[=] identifier[filenameStartOff] operator[+] identifier[filenameLen] operator[SEP] Keyword[if] operator[SEP] identifier[filenameEndOff] operator[>] identifier[cenSize] operator[SEP] {
Keyword[if] operator[SEP] identifier[log] operator[!=] Other[null] operator[SEP] {
identifier[log] operator[SEP] identifier[log] operator[SEP] literal[String] operator[+] identifier[entOff] operator[SEP] operator[SEP]
}
Keyword[break] operator[SEP]
}
Keyword[final] identifier[String] identifier[entryName] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getString] operator[SEP] identifier[entryBytes] , identifier[filenameStartOff] , identifier[filenameLen] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getString] operator[SEP] identifier[cenPos] operator[+] identifier[filenameStartOff] , identifier[filenameLen] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[entryNameSanitized] operator[=] identifier[FileUtils] operator[SEP] identifier[sanitizeEntryPath] operator[SEP] identifier[entryName] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entryNameSanitized] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] identifier[entryName] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] {
Keyword[continue] operator[SEP]
}
Keyword[final] Keyword[int] identifier[flags] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[entryBytes] , identifier[entOff] operator[+] Other[8] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[cenPos] operator[+] identifier[entOff] operator[+] Other[8] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[flags] operator[&] Other[1] operator[SEP] operator[!=] Other[0] operator[SEP] {
Keyword[if] operator[SEP] identifier[log] operator[!=] Other[null] operator[SEP] {
identifier[log] operator[SEP] identifier[log] operator[SEP] literal[String] operator[+] identifier[entryNameSanitized] operator[SEP] operator[SEP]
}
Keyword[continue] operator[SEP]
}
Keyword[final] Keyword[int] identifier[compressionMethod] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[entryBytes] , identifier[entOff] operator[+] Other[10] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[cenPos] operator[+] identifier[entOff] operator[+] Other[10] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[compressionMethod] operator[!=] Other[0] operator[&&] identifier[compressionMethod] operator[!=] Other[8] operator[SEP] {
Keyword[if] operator[SEP] identifier[log] operator[!=] Other[null] operator[SEP] {
identifier[log] operator[SEP] identifier[log] operator[SEP] literal[String] operator[+] identifier[compressionMethod] operator[+] literal[String] operator[+] identifier[entryNameSanitized] operator[SEP] operator[SEP]
}
Keyword[continue] operator[SEP]
}
Keyword[final] Keyword[boolean] identifier[isDeflated] operator[=] identifier[compressionMethod] operator[==] Other[8] operator[SEP] Keyword[long] identifier[compressedSize] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[entryBytes] , identifier[entOff] operator[+] Other[20] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[cenPos] operator[+] identifier[entOff] operator[+] Other[20] operator[SEP] operator[SEP] Keyword[long] identifier[uncompressedSize] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[entryBytes] , identifier[entOff] operator[+] Other[24] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[cenPos] operator[+] identifier[entOff] operator[+] Other[24] operator[SEP] operator[SEP] Keyword[long] identifier[pos] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[entryBytes] , identifier[entOff] operator[+] Other[42] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getInt] operator[SEP] identifier[cenPos] operator[+] identifier[entOff] operator[+] Other[42] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[extraFieldLen] operator[>] Other[0] operator[SEP] {
Keyword[for] operator[SEP] Keyword[int] identifier[extraFieldOff] operator[=] Other[0] operator[SEP] identifier[extraFieldOff] operator[+] Other[4] operator[<] identifier[extraFieldLen] operator[SEP] operator[SEP] {
Keyword[final] Keyword[long] identifier[tagOff] operator[=] identifier[filenameEndOff] operator[+] identifier[extraFieldOff] operator[SEP] Keyword[final] Keyword[int] identifier[tag] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[entryBytes] , identifier[tagOff] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[cenPos] operator[+] identifier[tagOff] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[size] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[entryBytes] , identifier[tagOff] operator[+] Other[2] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getShort] operator[SEP] identifier[cenPos] operator[+] identifier[tagOff] operator[+] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[extraFieldOff] operator[+] Other[4] operator[+] identifier[size] operator[>] identifier[extraFieldLen] operator[SEP] {
Keyword[break] operator[SEP]
}
Keyword[if] operator[SEP] identifier[tag] operator[==] Other[1] operator[&&] identifier[size] operator[>=] Other[24] operator[SEP] {
Keyword[final] Keyword[long] identifier[uncompressedSizeL] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getLong] operator[SEP] identifier[entryBytes] , identifier[tagOff] operator[+] Other[4] operator[+] Other[0] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getLong] operator[SEP] identifier[cenPos] operator[+] identifier[tagOff] operator[+] Other[4] operator[+] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[uncompressedSize] operator[==] literal[Integer] operator[SEP] {
identifier[uncompressedSize] operator[=] identifier[uncompressedSizeL] operator[SEP]
}
Keyword[final] Keyword[long] identifier[compressedSizeL] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getLong] operator[SEP] identifier[entryBytes] , identifier[tagOff] operator[+] Other[4] operator[+] Other[8] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getLong] operator[SEP] identifier[cenPos] operator[+] identifier[tagOff] operator[+] Other[4] operator[+] Other[8] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[compressedSize] operator[==] literal[Integer] operator[SEP] {
identifier[compressedSize] operator[=] identifier[compressedSizeL] operator[SEP]
}
Keyword[final] Keyword[long] identifier[posL] operator[=] identifier[entryBytes] operator[!=] Other[null] operator[?] identifier[ZipFileSliceReader] operator[SEP] identifier[getLong] operator[SEP] identifier[entryBytes] , identifier[tagOff] operator[+] Other[4] operator[+] Other[16] operator[SEP] operator[:] identifier[zipFileSliceReader] operator[SEP] identifier[getLong] operator[SEP] identifier[cenPos] operator[+] identifier[tagOff] operator[+] Other[4] operator[+] Other[16] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pos] operator[==] literal[Integer] operator[SEP] {
identifier[pos] operator[=] identifier[posL] operator[SEP]
}
Keyword[break] operator[SEP]
}
identifier[extraFieldOff] operator[+=] Other[4] operator[+] identifier[size] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[compressedSize] operator[<] Other[0] operator[||] identifier[pos] operator[<] Other[0] operator[SEP] {
Keyword[continue] operator[SEP]
}
Keyword[final] Keyword[long] identifier[locHeaderPos] operator[=] identifier[locPos] operator[+] identifier[pos] operator[SEP] Keyword[if] operator[SEP] identifier[locHeaderPos] operator[<] Other[0] operator[SEP] {
Keyword[if] operator[SEP] identifier[log] operator[!=] Other[null] operator[SEP] {
identifier[log] operator[SEP] identifier[log] operator[SEP] literal[String] operator[+] identifier[entryNameSanitized] operator[SEP] operator[SEP]
}
Keyword[continue] operator[SEP]
}
Keyword[if] operator[SEP] identifier[locHeaderPos] operator[+] Other[4] operator[>=] identifier[len] operator[SEP] {
Keyword[if] operator[SEP] identifier[log] operator[!=] Other[null] operator[SEP] {
identifier[log] operator[SEP] identifier[log] operator[SEP] literal[String] operator[+] identifier[entryNameSanitized] operator[SEP] operator[SEP]
}
Keyword[continue] operator[SEP]
}
Keyword[final] identifier[FastZipEntry] identifier[entry] operator[=] Keyword[new] identifier[FastZipEntry] operator[SEP] Keyword[this] , identifier[locHeaderPos] , identifier[entryNameSanitized] , identifier[isDeflated] , identifier[compressedSize] , identifier[uncompressedSize] , identifier[physicalZipFile] operator[SEP] identifier[nestedJarHandler] operator[SEP] operator[SEP] identifier[entries] operator[SEP] identifier[add] operator[SEP] identifier[entry] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[entryName] operator[SEP] identifier[equals] operator[SEP] identifier[MANIFEST_PATH] operator[SEP] operator[SEP] {
identifier[manifestZipEntry] operator[=] identifier[entry] operator[SEP]
}
}
}
Keyword[catch] operator[SEP] identifier[EOFException] operator[|] identifier[IndexOutOfBoundsException] identifier[e] operator[SEP] {
Keyword[if] operator[SEP] identifier[log] operator[!=] Other[null] operator[SEP] {
identifier[log] operator[SEP] identifier[log] operator[SEP] literal[String] operator[+] operator[SEP] identifier[entries] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] literal[String] operator[:] literal[String] operator[+] identifier[entries] operator[SEP] identifier[get] operator[SEP] identifier[entries] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[manifestZipEntry] operator[!=] Other[null] operator[SEP] {
identifier[parseManifest] operator[SEP] identifier[manifestZipEntry] , identifier[log] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[isMultiReleaseJar] operator[SEP] {
Keyword[if] operator[SEP] identifier[VersionFinder] operator[SEP] identifier[JAVA_MAJOR_VERSION] operator[<] Other[9] operator[SEP] {
Keyword[if] operator[SEP] identifier[log] operator[!=] Other[null] operator[SEP] {
identifier[log] operator[SEP] identifier[log] operator[SEP] literal[String] operator[+] identifier[VersionFinder] operator[SEP] identifier[JAVA_MAJOR_VERSION] operator[+] literal[String] operator[SEP] operator[SEP]
}
}
Keyword[else] {
Keyword[if] operator[SEP] identifier[log] operator[!=] Other[null] operator[SEP] {
Keyword[final] identifier[Set] operator[<] identifier[Integer] operator[>] identifier[versionsFound] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[FastZipEntry] identifier[entry] operator[:] identifier[entries] operator[SEP] {
Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[version] operator[>] Other[8] operator[SEP] {
identifier[versionsFound] operator[SEP] identifier[add] operator[SEP] identifier[entry] operator[SEP] identifier[version] operator[SEP] operator[SEP]
}
}
Keyword[final] identifier[List] operator[<] identifier[Integer] operator[>] identifier[versionsFoundSorted] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[versionsFound] operator[SEP] operator[SEP] identifier[CollectionUtils] operator[SEP] identifier[sortIfNotEmpty] operator[SEP] identifier[versionsFoundSorted] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[log] operator[SEP] literal[String] operator[+] identifier[Join] operator[SEP] identifier[join] operator[SEP] literal[String] , identifier[versionsFoundSorted] operator[SEP] operator[SEP] operator[SEP]
}
identifier[CollectionUtils] operator[SEP] identifier[sortIfNotEmpty] operator[SEP] identifier[entries] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[FastZipEntry] operator[>] identifier[unversionedZipEntriesMasked] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[entries] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[unversionedPathToVersionedPath] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[FastZipEntry] identifier[versionedZipEntry] operator[:] identifier[entries] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[unversionedPathToVersionedPath] operator[SEP] identifier[containsKey] operator[SEP] identifier[versionedZipEntry] operator[SEP] identifier[entryNameUnversioned] operator[SEP] operator[SEP] {
identifier[unversionedPathToVersionedPath] operator[SEP] identifier[put] operator[SEP] identifier[versionedZipEntry] operator[SEP] identifier[entryNameUnversioned] , identifier[versionedZipEntry] operator[SEP] identifier[entryName] operator[SEP] operator[SEP] identifier[unversionedZipEntriesMasked] operator[SEP] identifier[add] operator[SEP] identifier[versionedZipEntry] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[log] operator[!=] Other[null] operator[SEP] {
identifier[log] operator[SEP] identifier[log] operator[SEP] identifier[unversionedPathToVersionedPath] operator[SEP] identifier[get] operator[SEP] identifier[versionedZipEntry] operator[SEP] identifier[entryNameUnversioned] operator[SEP] operator[+] literal[String] operator[+] identifier[versionedZipEntry] operator[SEP] identifier[entryName] operator[SEP] operator[SEP]
}
}
identifier[entries] operator[=] identifier[unversionedZipEntriesMasked] operator[SEP]
}
}
}
|
public void blockExcept(Integer... values) {
free.clear();
for( Integer value: values ){
free.add(value);
}
} | class class_name[name] begin[{]
method[blockExcept, return_type[void], modifier[public], parameter[values]] begin[{]
call[free.clear, parameter[]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=free, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None)
end[}]
END[}] | Keyword[public] Keyword[void] identifier[blockExcept] operator[SEP] identifier[Integer] operator[...] identifier[values] operator[SEP] {
identifier[free] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Integer] identifier[value] operator[:] identifier[values] operator[SEP] {
identifier[free] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] operator[SEP]
}
}
|
public static dnssoarec[] get(nitro_service service, dnssoarec_args args) throws Exception{
dnssoarec obj = new dnssoarec();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
dnssoarec[] response = (dnssoarec[])obj.get_resources(service, option);
return response;
} | class class_name[name] begin[{]
method[get, return_type[type[dnssoarec]], modifier[public static], parameter[service, args]] begin[{]
local_variable[type[dnssoarec], obj]
local_variable[type[options], option]
call[option.set_args, parameter[call[nitro_util.object_to_string_withoutquotes, parameter[member[.args]]]]]
local_variable[type[dnssoarec], response]
return[member[.response]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[dnssoarec] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[dnssoarec_args] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[dnssoarec] identifier[obj] operator[=] Keyword[new] identifier[dnssoarec] 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_args] operator[SEP] identifier[nitro_util] operator[SEP] identifier[object_to_string_withoutquotes] operator[SEP] identifier[args] operator[SEP] operator[SEP] operator[SEP] identifier[dnssoarec] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[dnssoarec] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[get_resources] operator[SEP] identifier[service] , identifier[option] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP]
}
|
public static StackTraceElement getCallerStackTraceElement () {
StackTraceElement callerStackTraceElement = null;
StackTraceElement[] stackTraceElements = Thread.currentThread ().getStackTrace ();
if (stackTraceElements != null) {
if (stackTraceElements.length > 3) {
callerStackTraceElement = stackTraceElements[3];
}
}
return callerStackTraceElement;
} | class class_name[name] begin[{]
method[getCallerStackTraceElement, return_type[type[StackTraceElement]], modifier[public static], parameter[]] begin[{]
local_variable[type[StackTraceElement], callerStackTraceElement]
local_variable[type[StackTraceElement], stackTraceElements]
if[binary_operation[member[.stackTraceElements], !=, literal[null]]] begin[{]
if[binary_operation[member[stackTraceElements.length], >, literal[3]]] begin[{]
assign[member[.callerStackTraceElement], member[.stackTraceElements]]
else begin[{]
None
end[}]
else begin[{]
None
end[}]
return[member[.callerStackTraceElement]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[StackTraceElement] identifier[getCallerStackTraceElement] operator[SEP] operator[SEP] {
identifier[StackTraceElement] identifier[callerStackTraceElement] operator[=] Other[null] operator[SEP] identifier[StackTraceElement] operator[SEP] operator[SEP] identifier[stackTraceElements] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getStackTrace] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[stackTraceElements] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[stackTraceElements] operator[SEP] identifier[length] operator[>] Other[3] operator[SEP] {
identifier[callerStackTraceElement] operator[=] identifier[stackTraceElements] operator[SEP] Other[3] operator[SEP] operator[SEP]
}
}
Keyword[return] identifier[callerStackTraceElement] operator[SEP]
}
|
public static Object getAttribute(UIComponent component, String attributeName) {
Object value = component.getPassThroughAttributes().get(attributeName);
if (null == value) {
value = component.getAttributes().get(attributeName);
}
if (null == value) {
if (!attributeName.equals(attributeName.toLowerCase())) {
return getAttribute(component, attributeName.toLowerCase());
}
}
if (value instanceof ValueExpression) {
value = ((ValueExpression) value).getValue(FacesContext.getCurrentInstance().getELContext());
}
return value;
} | class class_name[name] begin[{]
method[getAttribute, return_type[type[Object]], modifier[public static], parameter[component, attributeName]] begin[{]
local_variable[type[Object], value]
if[binary_operation[literal[null], ==, member[.value]]] begin[{]
assign[member[.value], call[component.getAttributes, parameter[]]]
else begin[{]
None
end[}]
if[binary_operation[literal[null], ==, member[.value]]] begin[{]
if[call[attributeName.equals, parameter[call[attributeName.toLowerCase, parameter[]]]]] begin[{]
return[call[.getAttribute, parameter[member[.component], call[attributeName.toLowerCase, parameter[]]]]]
else begin[{]
None
end[}]
else begin[{]
None
end[}]
if[binary_operation[member[.value], instanceof, type[ValueExpression]]] begin[{]
assign[member[.value], Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ValueExpression, sub_type=None))]
else begin[{]
None
end[}]
return[member[.value]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Object] identifier[getAttribute] operator[SEP] identifier[UIComponent] identifier[component] , identifier[String] identifier[attributeName] operator[SEP] {
identifier[Object] identifier[value] operator[=] identifier[component] operator[SEP] identifier[getPassThroughAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[value] operator[SEP] {
identifier[value] operator[=] identifier[component] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] Other[null] operator[==] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[attributeName] operator[SEP] identifier[equals] operator[SEP] identifier[attributeName] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[getAttribute] operator[SEP] identifier[component] , identifier[attributeName] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[ValueExpression] operator[SEP] {
identifier[value] operator[=] operator[SEP] operator[SEP] identifier[ValueExpression] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] identifier[FacesContext] operator[SEP] identifier[getCurrentInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getELContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] identifier[value] operator[SEP]
}
|
static public void setLogLevel(LogLevel level) {
logLevel = level;
log.setLevel(level.value());
for (Handler handler : log.getHandlers()) {
handler.setLevel(level.value());
}
} | class class_name[name] begin[{]
method[setLogLevel, return_type[void], modifier[public static], parameter[level]] begin[{]
assign[member[.logLevel], member[.level]]
call[log.setLevel, parameter[call[level.value, parameter[]]]]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=value, postfix_operators=[], prefix_operators=[], qualifier=level, selectors=[], type_arguments=None)], member=setLevel, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getHandlers, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=handler)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Handler, sub_type=None))), label=None)
end[}]
END[}] | Keyword[static] Keyword[public] Keyword[void] identifier[setLogLevel] operator[SEP] identifier[LogLevel] identifier[level] operator[SEP] {
identifier[logLevel] operator[=] identifier[level] operator[SEP] identifier[log] operator[SEP] identifier[setLevel] operator[SEP] identifier[level] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Handler] identifier[handler] operator[:] identifier[log] operator[SEP] identifier[getHandlers] operator[SEP] operator[SEP] operator[SEP] {
identifier[handler] operator[SEP] identifier[setLevel] operator[SEP] identifier[level] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
|
public static final String getSelectedText(ListBox list) {
int index = list.getSelectedIndex();
return (index >= 0) ? list.getItemText(index) : null;
} | class class_name[name] begin[{]
method[getSelectedText, return_type[type[String]], modifier[final public static], parameter[list]] begin[{]
local_variable[type[int], index]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getItemText, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None))]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[final] identifier[String] identifier[getSelectedText] operator[SEP] identifier[ListBox] identifier[list] operator[SEP] {
Keyword[int] identifier[index] operator[=] identifier[list] operator[SEP] identifier[getSelectedIndex] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[index] operator[>=] Other[0] operator[SEP] operator[?] identifier[list] operator[SEP] identifier[getItemText] operator[SEP] identifier[index] operator[SEP] operator[:] Other[null] operator[SEP]
}
|
@Override
public void dispatch(final DispatchRequest req) {
executor.execute(new Runnable() {
@Override
public void run() {
req.invoke();
}
});
} | class class_name[name] begin[{]
method[dispatch, return_type[void], modifier[public], parameter[req]] begin[{]
call[executor.execute, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=req, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Runnable, sub_type=None))]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[dispatch] operator[SEP] Keyword[final] identifier[DispatchRequest] identifier[req] operator[SEP] {
identifier[executor] operator[SEP] identifier[execute] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] {
identifier[req] operator[SEP] identifier[invoke] operator[SEP] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP]
}
|
public static List<CPDefinitionOptionRel> findByCompanyId(long companyId,
int start, int end) {
return getPersistence().findByCompanyId(companyId, start, end);
} | class class_name[name] begin[{]
method[findByCompanyId, return_type[type[List]], modifier[public static], parameter[companyId, start, end]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CPDefinitionOptionRel] operator[>] identifier[findByCompanyId] operator[SEP] Keyword[long] identifier[companyId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] {
Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[findByCompanyId] operator[SEP] identifier[companyId] , identifier[start] , identifier[end] operator[SEP] operator[SEP]
}
|
public CustomFields createCustomField(String accountId, CustomField customField, AccountsApi.CreateCustomFieldOptions options) throws ApiException {
Object localVarPostBody = customField;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling createCustomField");
}
// create path and map variables
String localVarPath = "/v2/accounts/{accountId}/custom_fields".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));
// query params
java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>();
java.util.Map<String, String> localVarHeaderParams = new java.util.HashMap<String, String>();
java.util.Map<String, Object> localVarFormParams = new java.util.HashMap<String, Object>();
if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPairs("", "apply_to_templates", options.applyToTemplates));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" }; //{ };
GenericType<CustomFields> localVarReturnType = new GenericType<CustomFields>() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
} | class class_name[name] begin[{]
method[createCustomField, return_type[type[CustomFields]], modifier[public], parameter[accountId, customField, options]] begin[{]
local_variable[type[Object], localVarPostBody]
if[binary_operation[member[.accountId], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=400), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Missing the required parameter 'accountId' when calling createCustomField")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ApiException, sub_type=None)), label=None)
else begin[{]
None
end[}]
local_variable[type[String], localVarPath]
local_variable[type[java], localVarQueryParams]
local_variable[type[java], localVarHeaderParams]
local_variable[type[java], localVarFormParams]
if[binary_operation[member[.options], !=, literal[null]]] begin[{]
call[localVarQueryParams.addAll, parameter[call[apiClient.parameterToPairs, parameter[literal[""], literal["apply_to_templates"], member[options.applyToTemplates]]]]]
else begin[{]
None
end[}]
local_variable[type[String], localVarAccepts]
local_variable[type[String], localVarAccept]
local_variable[type[String], localVarContentTypes]
local_variable[type[String], localVarContentType]
local_variable[type[String], localVarAuthNames]
local_variable[type[GenericType], localVarReturnType]
return[call[apiClient.invokeAPI, parameter[member[.localVarPath], literal["POST"], member[.localVarQueryParams], member[.localVarPostBody], member[.localVarHeaderParams], member[.localVarFormParams], member[.localVarAccept], member[.localVarContentType], member[.localVarAuthNames], member[.localVarReturnType]]]]
end[}]
END[}] | Keyword[public] identifier[CustomFields] identifier[createCustomField] operator[SEP] identifier[String] identifier[accountId] , identifier[CustomField] identifier[customField] , identifier[AccountsApi] operator[SEP] identifier[CreateCustomFieldOptions] identifier[options] operator[SEP] Keyword[throws] identifier[ApiException] {
identifier[Object] identifier[localVarPostBody] operator[=] identifier[customField] operator[SEP] Keyword[if] operator[SEP] identifier[accountId] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[ApiException] operator[SEP] Other[400] , literal[String] operator[SEP] operator[SEP]
}
identifier[String] identifier[localVarPath] operator[=] literal[String] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] operator[+] literal[String] operator[+] literal[String] , identifier[apiClient] operator[SEP] identifier[escapeString] operator[SEP] identifier[accountId] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[Pair] operator[>] identifier[localVarQueryParams] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[Pair] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[localVarHeaderParams] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[localVarFormParams] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[options] operator[!=] Other[null] operator[SEP] {
identifier[localVarQueryParams] operator[SEP] identifier[addAll] operator[SEP] identifier[apiClient] operator[SEP] identifier[parameterToPairs] operator[SEP] literal[String] , literal[String] , identifier[options] operator[SEP] identifier[applyToTemplates] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[localVarAccepts] operator[=] {
literal[String]
} operator[SEP] Keyword[final] identifier[String] identifier[localVarAccept] operator[=] identifier[apiClient] operator[SEP] identifier[selectHeaderAccept] operator[SEP] identifier[localVarAccepts] operator[SEP] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[localVarContentTypes] operator[=] {
} operator[SEP] Keyword[final] identifier[String] identifier[localVarContentType] operator[=] identifier[apiClient] operator[SEP] identifier[selectHeaderContentType] operator[SEP] identifier[localVarContentTypes] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[localVarAuthNames] operator[=] Keyword[new] identifier[String] operator[SEP] operator[SEP] {
literal[String]
} operator[SEP] identifier[GenericType] operator[<] identifier[CustomFields] operator[>] identifier[localVarReturnType] operator[=] Keyword[new] identifier[GenericType] operator[<] identifier[CustomFields] operator[>] operator[SEP] operator[SEP] {
} operator[SEP] Keyword[return] identifier[apiClient] operator[SEP] identifier[invokeAPI] operator[SEP] identifier[localVarPath] , literal[String] , identifier[localVarQueryParams] , identifier[localVarPostBody] , identifier[localVarHeaderParams] , identifier[localVarFormParams] , identifier[localVarAccept] , identifier[localVarContentType] , identifier[localVarAuthNames] , identifier[localVarReturnType] operator[SEP] operator[SEP]
}
|
private void handleUndeliverableMessage(
DestinationHandler destinationHandler,
LinkHandler linkHandler,
SIMPMessage msg,
int exceptionReason,
String[] exceptionInserts,
TransactionCommon tran) throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(
tc,
"handleUndeliverableMessage",
new Object[] { destinationHandler, linkHandler, msg, new Integer(exceptionReason), exceptionInserts,
tran });
// Destination exception destination handler
ExceptionDestinationHandlerImpl destExceptionDestination = null;
// Link exception destination handler
ExceptionDestinationHandlerImpl linkExceptionDestination = null;
// Create handlers associated with the destination and link handlers
if (destinationHandler == null)
{
if (linkHandler == null)
{
// Where both handlers are null retain the behaviour that uses the default exception destination.
destExceptionDestination = new ExceptionDestinationHandlerImpl(null, _messageProcessor);
}
// if the linkHandler is non null, then we'll establish a linkExceptionDestination below
}
else
{
// destinationHandler is non null
destExceptionDestination = new ExceptionDestinationHandlerImpl(destinationHandler);
} // eof destinationHandler != null
UndeliverableReturnCode rc = UndeliverableReturnCode.OK;
// Pass the undeliverable message to the destination exception destination if it is not null
if (destExceptionDestination != null)
{
rc =
destExceptionDestination.handleUndeliverableMessage(
msg,
tran,
exceptionReason,
exceptionInserts);
}
// If no destination exception destination was established or if we got a BLOCK return from the use
// of the destination exception destination, then we drive the link exception destination
if (destExceptionDestination == null || rc == UndeliverableReturnCode.BLOCK)
{
// Get the Link Exception Destination
if (linkHandler != null)
{
linkExceptionDestination = new ExceptionDestinationHandlerImpl(linkHandler);
rc =
linkExceptionDestination.handleUndeliverableMessage(
msg,
tran,
exceptionReason,
exceptionInserts);
}
}
// If the ExceptionDestinationHandlerImpl.handleUndeliverableMessage() call returned either a
// "BLOCK" or an "ERROR" return then we throw an exception. BLOCK will be returned if the exception
// destination is full or if a null or empty exception destination was configured.
//
// In the error case we generate an FFDC but in both cases we throw an exception to get the caller to
// fail the attempt to store the message, forcing it to either return the error or retry at it's discretion.
if (rc == UndeliverableReturnCode.BLOCK)
{
// Throw an exception
SIResourceException e = new SIResourceException(
nls.getFormattedMessage(
"INTERNAL_MESSAGING_ERROR_CWSIP0005",
new Object[] {
"com.ibm.ws.sib.processor.impl.PtoPInputHandler",
"1:3103:1.323",
rc },
null));
SibTr.exception(tc, e);
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "handleUndeliverableMessage", e);
throw e;
}
// An ERROR just isn't acceptable
else if (rc == UndeliverableReturnCode.ERROR)
{
//We cannot put the message to the exception destination. Throw an
//exception and trace FFST.
SIErrorException e = new SIErrorException(
nls.getFormattedMessage(
"INTERNAL_MESSAGING_ERROR_CWSIP0005",
new Object[] {
"com.ibm.ws.sib.processor.impl.PtoPInputHandler",
"1:3124:1.323",
rc },
null));
FFDCFilter.processException(
e,
"com.ibm.ws.sib.processor.impl.PtoPInputHandler.handleUndeliverableMessage",
"1:3131:1.323",
this);
SibTr.exception(tc, e);
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "handleUndeliverableMessage", e);
throw e;
}
// otherwise a DISCARD is equivalent to an OK so let it go
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "handleUndeliverableMessage");
return;
} | class class_name[name] begin[{]
method[handleUndeliverableMessage, return_type[void], modifier[private], parameter[destinationHandler, linkHandler, msg, exceptionReason, exceptionInserts, tran]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member[.tc], literal["handleUndeliverableMessage"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=destinationHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=linkHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=exceptionReason, 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=Integer, sub_type=None)), MemberReference(member=exceptionInserts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tran, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]]
else begin[{]
None
end[}]
local_variable[type[ExceptionDestinationHandlerImpl], destExceptionDestination]
local_variable[type[ExceptionDestinationHandlerImpl], linkExceptionDestination]
if[binary_operation[member[.destinationHandler], ==, literal[null]]] begin[{]
if[binary_operation[member[.linkHandler], ==, literal[null]]] begin[{]
assign[member[.destExceptionDestination], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=_messageProcessor, 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=ExceptionDestinationHandlerImpl, sub_type=None))]
else begin[{]
None
end[}]
else begin[{]
assign[member[.destExceptionDestination], ClassCreator(arguments=[MemberReference(member=destinationHandler, 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=ExceptionDestinationHandlerImpl, sub_type=None))]
end[}]
local_variable[type[UndeliverableReturnCode], rc]
if[binary_operation[member[.destExceptionDestination], !=, literal[null]]] begin[{]
assign[member[.rc], call[destExceptionDestination.handleUndeliverableMessage, parameter[member[.msg], member[.tran], member[.exceptionReason], member[.exceptionInserts]]]]
else begin[{]
None
end[}]
if[binary_operation[binary_operation[member[.destExceptionDestination], ==, literal[null]], ||, binary_operation[member[.rc], ==, member[UndeliverableReturnCode.BLOCK]]]] begin[{]
if[binary_operation[member[.linkHandler], !=, literal[null]]] begin[{]
assign[member[.linkExceptionDestination], ClassCreator(arguments=[MemberReference(member=linkHandler, 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=ExceptionDestinationHandlerImpl, sub_type=None))]
assign[member[.rc], call[linkExceptionDestination.handleUndeliverableMessage, parameter[member[.msg], member[.tran], member[.exceptionReason], member[.exceptionInserts]]]]
else begin[{]
None
end[}]
else begin[{]
None
end[}]
if[binary_operation[member[.rc], ==, member[UndeliverableReturnCode.BLOCK]]] begin[{]
local_variable[type[SIResourceException], e]
call[SibTr.exception, parameter[member[.tc], member[.e]]]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.exit, parameter[member[.tc], literal["handleUndeliverableMessage"], member[.e]]]
else begin[{]
None
end[}]
ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)
else begin[{]
if[binary_operation[member[.rc], ==, member[UndeliverableReturnCode.ERROR]]] begin[{]
local_variable[type[SIErrorException], e]
call[FFDCFilter.processException, parameter[member[.e], literal["com.ibm.ws.sib.processor.impl.PtoPInputHandler.handleUndeliverableMessage"], literal["1:3131:1.323"], THIS[]]]
call[SibTr.exception, parameter[member[.tc], member[.e]]]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.exit, parameter[member[.tc], literal["handleUndeliverableMessage"], member[.e]]]
else begin[{]
None
end[}]
ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)
else begin[{]
None
end[}]
end[}]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.exit, parameter[member[.tc], literal["handleUndeliverableMessage"]]]
else begin[{]
None
end[}]
return[None]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[handleUndeliverableMessage] operator[SEP] identifier[DestinationHandler] identifier[destinationHandler] , identifier[LinkHandler] identifier[linkHandler] , identifier[SIMPMessage] identifier[msg] , Keyword[int] identifier[exceptionReason] , identifier[String] operator[SEP] operator[SEP] identifier[exceptionInserts] , identifier[TransactionCommon] identifier[tran] operator[SEP] Keyword[throws] identifier[SIResourceException] {
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[destinationHandler] , identifier[linkHandler] , identifier[msg] , Keyword[new] identifier[Integer] operator[SEP] identifier[exceptionReason] operator[SEP] , identifier[exceptionInserts] , identifier[tran]
} operator[SEP] operator[SEP] identifier[ExceptionDestinationHandlerImpl] identifier[destExceptionDestination] operator[=] Other[null] operator[SEP] identifier[ExceptionDestinationHandlerImpl] identifier[linkExceptionDestination] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[destinationHandler] operator[==] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[linkHandler] operator[==] Other[null] operator[SEP] {
identifier[destExceptionDestination] operator[=] Keyword[new] identifier[ExceptionDestinationHandlerImpl] operator[SEP] Other[null] , identifier[_messageProcessor] operator[SEP] operator[SEP]
}
}
Keyword[else] {
identifier[destExceptionDestination] operator[=] Keyword[new] identifier[ExceptionDestinationHandlerImpl] operator[SEP] identifier[destinationHandler] operator[SEP] operator[SEP]
}
identifier[UndeliverableReturnCode] identifier[rc] operator[=] identifier[UndeliverableReturnCode] operator[SEP] identifier[OK] operator[SEP] Keyword[if] operator[SEP] identifier[destExceptionDestination] operator[!=] Other[null] operator[SEP] {
identifier[rc] operator[=] identifier[destExceptionDestination] operator[SEP] identifier[handleUndeliverableMessage] operator[SEP] identifier[msg] , identifier[tran] , identifier[exceptionReason] , identifier[exceptionInserts] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[destExceptionDestination] operator[==] Other[null] operator[||] identifier[rc] operator[==] identifier[UndeliverableReturnCode] operator[SEP] identifier[BLOCK] operator[SEP] {
Keyword[if] operator[SEP] identifier[linkHandler] operator[!=] Other[null] operator[SEP] {
identifier[linkExceptionDestination] operator[=] Keyword[new] identifier[ExceptionDestinationHandlerImpl] operator[SEP] identifier[linkHandler] operator[SEP] operator[SEP] identifier[rc] operator[=] identifier[linkExceptionDestination] operator[SEP] identifier[handleUndeliverableMessage] operator[SEP] identifier[msg] , identifier[tran] , identifier[exceptionReason] , identifier[exceptionInserts] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[rc] operator[==] identifier[UndeliverableReturnCode] operator[SEP] identifier[BLOCK] operator[SEP] {
identifier[SIResourceException] identifier[e] operator[=] Keyword[new] identifier[SIResourceException] operator[SEP] identifier[nls] operator[SEP] identifier[getFormattedMessage] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] {
literal[String] , literal[String] , identifier[rc]
} , Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] identifier[tc] , identifier[e] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[rc] operator[==] identifier[UndeliverableReturnCode] operator[SEP] identifier[ERROR] operator[SEP] {
identifier[SIErrorException] identifier[e] operator[=] Keyword[new] identifier[SIErrorException] operator[SEP] identifier[nls] operator[SEP] identifier[getFormattedMessage] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] {
literal[String] , literal[String] , identifier[rc]
} , Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] identifier[tc] , identifier[e] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP]
}
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP]
}
|
private void handleChangeConfigurationRequest(final int executorId, final String actionName,
final HttpServletRequest req, final HashMap<String, Object> ret)
throws ServletException, IOException {
try {
final Map<String, Object> result =
this.execManagerAdapter
.callExecutorStats(executorId, actionName, getAllParams(req));
if (result.containsKey(ConnectorParams.RESPONSE_ERROR)) {
ret.put(ConnectorParams.RESPONSE_ERROR,
result.get(ConnectorParams.RESPONSE_ERROR).toString());
} else {
ret.put(ConnectorParams.STATUS_PARAM,
result.get(ConnectorParams.STATUS_PARAM));
}
} catch (final ExecutorManagerException ex) {
logger.error(ex.getMessage(), ex);
ret.put("error", "Failed to change config change");
}
} | class class_name[name] begin[{]
method[handleChangeConfigurationRequest, return_type[void], modifier[private], parameter[executorId, actionName, req, ret]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=execManagerAdapter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=executorId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=actionName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=req, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAllParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=callExecutorStats, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=result)], modifiers={'final'}, 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)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=RESPONSE_ERROR, postfix_operators=[], prefix_operators=[], qualifier=ConnectorParams, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=STATUS_PARAM, postfix_operators=[], prefix_operators=[], qualifier=ConnectorParams, selectors=[]), MethodInvocation(arguments=[MemberReference(member=STATUS_PARAM, postfix_operators=[], prefix_operators=[], qualifier=ConnectorParams, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=ret, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=RESPONSE_ERROR, postfix_operators=[], prefix_operators=[], qualifier=ConnectorParams, selectors=[]), MethodInvocation(arguments=[MemberReference(member=RESPONSE_ERROR, postfix_operators=[], prefix_operators=[], qualifier=ConnectorParams, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=ret, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="error"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to change config change")], member=put, postfix_operators=[], prefix_operators=[], qualifier=ret, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['ExecutorManagerException']))], finally_block=None, label=None, resources=None)
end[}]
END[}] | Keyword[private] Keyword[void] identifier[handleChangeConfigurationRequest] operator[SEP] Keyword[final] Keyword[int] identifier[executorId] , Keyword[final] identifier[String] identifier[actionName] , Keyword[final] identifier[HttpServletRequest] identifier[req] , Keyword[final] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[ret] operator[SEP] Keyword[throws] identifier[ServletException] , identifier[IOException] {
Keyword[try] {
Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[result] operator[=] Keyword[this] operator[SEP] identifier[execManagerAdapter] operator[SEP] identifier[callExecutorStats] operator[SEP] identifier[executorId] , identifier[actionName] , identifier[getAllParams] operator[SEP] identifier[req] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[containsKey] operator[SEP] identifier[ConnectorParams] operator[SEP] identifier[RESPONSE_ERROR] operator[SEP] operator[SEP] {
identifier[ret] operator[SEP] identifier[put] operator[SEP] identifier[ConnectorParams] operator[SEP] identifier[RESPONSE_ERROR] , identifier[result] operator[SEP] identifier[get] operator[SEP] identifier[ConnectorParams] operator[SEP] identifier[RESPONSE_ERROR] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[ret] operator[SEP] identifier[put] operator[SEP] identifier[ConnectorParams] operator[SEP] identifier[STATUS_PARAM] , identifier[result] operator[SEP] identifier[get] operator[SEP] identifier[ConnectorParams] operator[SEP] identifier[STATUS_PARAM] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[catch] operator[SEP] Keyword[final] identifier[ExecutorManagerException] identifier[ex] operator[SEP] {
identifier[logger] operator[SEP] identifier[error] operator[SEP] identifier[ex] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP]
}
}
|
private <I, V, O extends Option<I, V>> OptionsContainer getMostSpecificContainer(Class<O> optionType) {
OptionsContainer container;
if ( propertyName != null ) {
for ( Class<?> clazz : hierarchy ) {
for ( OptionValueSource source : sources ) {
container = source.getPropertyOptions( clazz, propertyName );
if ( !container.getAll( optionType ).isEmpty() ) {
return container;
}
}
}
}
if ( entityType != null ) {
for ( Class<?> clazz : hierarchy ) {
for ( OptionValueSource source : sources ) {
container = source.getEntityOptions( clazz );
if ( !container.getAll( optionType ).isEmpty() ) {
return container;
}
}
}
}
for ( OptionValueSource source : sources ) {
container = source.getGlobalOptions();
if ( !container.getAll( optionType ).isEmpty() ) {
return container;
}
}
return OptionsContainer.EMPTY;
} | class class_name[name] begin[{]
method[getMostSpecificContainer, return_type[type[OptionsContainer]], modifier[private], parameter[optionType]] begin[{]
local_variable[type[OptionsContainer], container]
if[binary_operation[member[.propertyName], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=container, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=propertyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPropertyOptions, postfix_operators=[], prefix_operators=[], qualifier=source, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=optionType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAll, postfix_operators=[], prefix_operators=['!'], qualifier=container, selectors=[MethodInvocation(arguments=[], member=isEmpty, 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=[ReturnStatement(expression=MemberReference(member=container, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=sources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=source)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OptionValueSource, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=hierarchy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=clazz)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))), label=None)
else begin[{]
None
end[}]
if[binary_operation[member[.entityType], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=container, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getEntityOptions, postfix_operators=[], prefix_operators=[], qualifier=source, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=optionType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAll, postfix_operators=[], prefix_operators=['!'], qualifier=container, selectors=[MethodInvocation(arguments=[], member=isEmpty, 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=[ReturnStatement(expression=MemberReference(member=container, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=sources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=source)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OptionValueSource, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=hierarchy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=clazz)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))), label=None)
else begin[{]
None
end[}]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=container, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getGlobalOptions, postfix_operators=[], prefix_operators=[], qualifier=source, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=optionType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAll, postfix_operators=[], prefix_operators=['!'], qualifier=container, selectors=[MethodInvocation(arguments=[], member=isEmpty, 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=[ReturnStatement(expression=MemberReference(member=container, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=sources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=source)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OptionValueSource, sub_type=None))), label=None)
return[member[OptionsContainer.EMPTY]]
end[}]
END[}] | Keyword[private] operator[<] identifier[I] , identifier[V] , identifier[O] Keyword[extends] identifier[Option] operator[<] identifier[I] , identifier[V] operator[>] operator[>] identifier[OptionsContainer] identifier[getMostSpecificContainer] operator[SEP] identifier[Class] operator[<] identifier[O] operator[>] identifier[optionType] operator[SEP] {
identifier[OptionsContainer] identifier[container] operator[SEP] Keyword[if] operator[SEP] identifier[propertyName] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[:] identifier[hierarchy] operator[SEP] {
Keyword[for] operator[SEP] identifier[OptionValueSource] identifier[source] operator[:] identifier[sources] operator[SEP] {
identifier[container] operator[=] identifier[source] operator[SEP] identifier[getPropertyOptions] operator[SEP] identifier[clazz] , identifier[propertyName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[container] operator[SEP] identifier[getAll] operator[SEP] identifier[optionType] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[container] operator[SEP]
}
}
}
}
Keyword[if] operator[SEP] identifier[entityType] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[:] identifier[hierarchy] operator[SEP] {
Keyword[for] operator[SEP] identifier[OptionValueSource] identifier[source] operator[:] identifier[sources] operator[SEP] {
identifier[container] operator[=] identifier[source] operator[SEP] identifier[getEntityOptions] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[container] operator[SEP] identifier[getAll] operator[SEP] identifier[optionType] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[container] operator[SEP]
}
}
}
}
Keyword[for] operator[SEP] identifier[OptionValueSource] identifier[source] operator[:] identifier[sources] operator[SEP] {
identifier[container] operator[=] identifier[source] operator[SEP] identifier[getGlobalOptions] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[container] operator[SEP] identifier[getAll] operator[SEP] identifier[optionType] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] identifier[container] operator[SEP]
}
}
Keyword[return] identifier[OptionsContainer] operator[SEP] identifier[EMPTY] operator[SEP]
}
|
@Override
public void chainQuiesced(ChainData chainData) {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "chainQuiesced", chainData);
chainState.set(ChainState.QUIESCED.val);
//First stop any MP connections which are established through COMMS
//stopping connections is Non-blocking
try {
if (this._isSecureChain)
_commsServerFacade.closeViaCommsMPConnections(JsConstants.ME_STOP_COMMS_SSL_CONNECTIONS);
else
_commsServerFacade.closeViaCommsMPConnections(JsConstants.ME_STOP_COMMS_CONNECTIONS);
} catch (Exception e) {
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
SibTr.debug(tc, "Failed in stopping MP connections which are establised through COMMS: ", e);
}
// no current connections, notify the final stop can happen now
signalNoConnections();
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "chainQuiesced");
} | class class_name[name] begin[{]
method[chainQuiesced, return_type[void], modifier[public], parameter[chainData]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.entry, parameter[member[.tc], literal["chainQuiesced"], member[.chainData]]]
else begin[{]
None
end[}]
call[chainState.set, parameter[member[ChainState.QUIESCED.val]]]
TryStatement(block=[IfStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=_isSecureChain, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), else_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ME_STOP_COMMS_CONNECTIONS, postfix_operators=[], prefix_operators=[], qualifier=JsConstants, selectors=[])], member=closeViaCommsMPConnections, postfix_operators=[], prefix_operators=[], qualifier=_commsServerFacade, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ME_STOP_COMMS_SSL_CONNECTIONS, postfix_operators=[], prefix_operators=[], qualifier=JsConstants, selectors=[])], member=closeViaCommsMPConnections, postfix_operators=[], prefix_operators=[], qualifier=_commsServerFacade, selectors=[], type_arguments=None), label=None))], catches=[CatchClause(block=[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=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed in stopping MP connections which are establised through COMMS: "), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, 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)
call[.signalNoConnections, parameter[]]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{]
call[SibTr.exit, parameter[member[.tc], literal["chainQuiesced"]]]
else begin[{]
None
end[}]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[chainQuiesced] operator[SEP] identifier[ChainData] identifier[chainData] 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] , identifier[chainData] operator[SEP] operator[SEP] identifier[chainState] operator[SEP] identifier[set] operator[SEP] identifier[ChainState] operator[SEP] identifier[QUIESCED] operator[SEP] identifier[val] operator[SEP] operator[SEP] Keyword[try] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[_isSecureChain] operator[SEP] identifier[_commsServerFacade] operator[SEP] identifier[closeViaCommsMPConnections] operator[SEP] identifier[JsConstants] operator[SEP] identifier[ME_STOP_COMMS_SSL_CONNECTIONS] operator[SEP] operator[SEP] Keyword[else] identifier[_commsServerFacade] operator[SEP] identifier[closeViaCommsMPConnections] operator[SEP] identifier[JsConstants] operator[SEP] identifier[ME_STOP_COMMS_CONNECTIONS] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] {
Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[e] operator[SEP] operator[SEP]
}
identifier[signalNoConnections] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP]
}
|
public void setMatchedTokens(int i, Token v) {
if (OntClassMention_Type.featOkTst && ((OntClassMention_Type)jcasType).casFeat_matchedTokens == null)
jcasType.jcas.throwFeatMissing("matchedTokens", "de.julielab.jules.types.OntClassMention");
jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((OntClassMention_Type)jcasType).casFeatCode_matchedTokens), i);
jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((OntClassMention_Type)jcasType).casFeatCode_matchedTokens), i, jcasType.ll_cas.ll_getFSRef(v));} | class class_name[name] begin[{]
method[setMatchedTokens, return_type[void], modifier[public], parameter[i, v]] begin[{]
if[binary_operation[member[OntClassMention_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=OntClassMention_Type, sub_type=None)), ==, literal[null]]]] begin[{]
call[jcasType.jcas.throwFeatMissing, parameter[literal["matchedTokens"], literal["de.julielab.jules.types.OntClassMention"]]]
else begin[{]
None
end[}]
call[jcasType.jcas.checkArrayBounds, parameter[call[jcasType.ll_cas.ll_getRefValue, parameter[member[.addr], Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=OntClassMention_Type, sub_type=None))]], member[.i]]]
call[jcasType.ll_cas.ll_setRefArrayValue, parameter[call[jcasType.ll_cas.ll_getRefValue, parameter[member[.addr], Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=OntClassMention_Type, sub_type=None))]], member[.i], call[jcasType.ll_cas.ll_getFSRef, parameter[member[.v]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setMatchedTokens] operator[SEP] Keyword[int] identifier[i] , identifier[Token] identifier[v] operator[SEP] {
Keyword[if] operator[SEP] identifier[OntClassMention_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[OntClassMention_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeat_matchedTokens] 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[jcas] operator[SEP] identifier[checkArrayBounds] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getRefValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[OntClassMention_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_matchedTokens] operator[SEP] , identifier[i] operator[SEP] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_setRefArrayValue] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getRefValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[OntClassMention_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_matchedTokens] operator[SEP] , identifier[i] , identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getFSRef] operator[SEP] identifier[v] operator[SEP] operator[SEP] operator[SEP]
}
|
private <T> void writeNameOrValue(TypedParser<T> helper, T val)
throws TException {
getCurrentContext().write();
try {
if (getCurrentContext().isMapKey()) {
getCurrentWriter().writeFieldName(val.toString());
} else {
helper.writeValue(getCurrentWriter(), val);
}
} catch (IOException ex) {
throw new TException(ex);
}
} | class class_name[name] begin[{]
method[writeNameOrValue, return_type[void], modifier[private], parameter[helper, val]] begin[{]
call[.getCurrentContext, parameter[]]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=getCurrentContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=isMapKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCurrentWriter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeValue, postfix_operators=[], prefix_operators=[], qualifier=helper, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getCurrentWriter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=val, selectors=[], type_arguments=None)], member=writeFieldName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IOException']))], finally_block=None, label=None, resources=None)
end[}]
END[}] | Keyword[private] operator[<] identifier[T] operator[>] Keyword[void] identifier[writeNameOrValue] operator[SEP] identifier[TypedParser] operator[<] identifier[T] operator[>] identifier[helper] , identifier[T] identifier[val] operator[SEP] Keyword[throws] identifier[TException] {
identifier[getCurrentContext] operator[SEP] operator[SEP] operator[SEP] identifier[write] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[if] operator[SEP] identifier[getCurrentContext] operator[SEP] operator[SEP] operator[SEP] identifier[isMapKey] operator[SEP] operator[SEP] operator[SEP] {
identifier[getCurrentWriter] operator[SEP] operator[SEP] operator[SEP] identifier[writeFieldName] operator[SEP] identifier[val] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[helper] operator[SEP] identifier[writeValue] operator[SEP] identifier[getCurrentWriter] operator[SEP] operator[SEP] , identifier[val] operator[SEP] operator[SEP]
}
}
Keyword[catch] operator[SEP] identifier[IOException] identifier[ex] operator[SEP] {
Keyword[throw] Keyword[new] identifier[TException] operator[SEP] identifier[ex] operator[SEP] operator[SEP]
}
}
|
@SafeVarargs
public static <T> List<T> of(T... elements) {
Preconditions.checkNotNull(elements);
return ofInternal(elements);
} | class class_name[name] begin[{]
method[of, return_type[type[List]], modifier[public static], parameter[elements]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.elements]]]
return[call[.ofInternal, parameter[member[.elements]]]]
end[}]
END[}] | annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[of] operator[SEP] identifier[T] operator[...] identifier[elements] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[elements] operator[SEP] operator[SEP] Keyword[return] identifier[ofInternal] operator[SEP] identifier[elements] operator[SEP] operator[SEP]
}
|
private static void inferPropertyTypesToMatchConstraint(
JSType type, JSType constraint) {
if (type == null || constraint == null) {
return;
}
type.matchConstraint(constraint);
} | class class_name[name] begin[{]
method[inferPropertyTypesToMatchConstraint, return_type[void], modifier[private static], parameter[type, constraint]] begin[{]
if[binary_operation[binary_operation[member[.type], ==, literal[null]], ||, binary_operation[member[.constraint], ==, literal[null]]]] begin[{]
return[None]
else begin[{]
None
end[}]
call[type.matchConstraint, parameter[member[.constraint]]]
end[}]
END[}] | Keyword[private] Keyword[static] Keyword[void] identifier[inferPropertyTypesToMatchConstraint] operator[SEP] identifier[JSType] identifier[type] , identifier[JSType] identifier[constraint] operator[SEP] {
Keyword[if] operator[SEP] identifier[type] operator[==] Other[null] operator[||] identifier[constraint] operator[==] Other[null] operator[SEP] {
Keyword[return] operator[SEP]
}
identifier[type] operator[SEP] identifier[matchConstraint] operator[SEP] identifier[constraint] operator[SEP] operator[SEP]
}
|
public static <T> SimplePageable<T> of(List<T> list) {
return new SimplePageable<>(nullSafeList(list));
} | class class_name[name] begin[{]
method[of, return_type[type[SimplePageable]], modifier[public static], parameter[list]] begin[{]
return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=nullSafeList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=SimplePageable, sub_type=None))]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[SimplePageable] operator[<] identifier[T] operator[>] identifier[of] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[list] operator[SEP] {
Keyword[return] Keyword[new] identifier[SimplePageable] operator[<] operator[>] operator[SEP] identifier[nullSafeList] operator[SEP] identifier[list] operator[SEP] operator[SEP] operator[SEP]
}
|
private boolean setProperty(String propertyName, int propertyValueNew) {
if(propertyName == null) return false;
Object propertyValueOld = getProperty(propertyName);
if(propertyValueOld instanceof Integer) {
int valueOld = ((Integer)propertyValueOld).intValue();
if (valueOld==propertyValueNew) return true;
}
beforeChange(propertyName);
properties.put(propertyName, Integer.valueOf(propertyValueNew));
afterChange(propertyName);
setModified(propertyName, true);
return true;
} | class class_name[name] begin[{]
method[setProperty, return_type[type[boolean]], modifier[private], parameter[propertyName, propertyValueNew]] begin[{]
if[binary_operation[member[.propertyName], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
local_variable[type[Object], propertyValueOld]
if[binary_operation[member[.propertyValueOld], instanceof, type[Integer]]] begin[{]
local_variable[type[int], valueOld]
if[binary_operation[member[.valueOld], ==, member[.propertyValueNew]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
else begin[{]
None
end[}]
call[.beforeChange, parameter[member[.propertyName]]]
call[properties.put, parameter[member[.propertyName], call[Integer.valueOf, parameter[member[.propertyValueNew]]]]]
call[.afterChange, parameter[member[.propertyName]]]
call[.setModified, parameter[member[.propertyName], literal[true]]]
return[literal[true]]
end[}]
END[}] | Keyword[private] Keyword[boolean] identifier[setProperty] operator[SEP] identifier[String] identifier[propertyName] , Keyword[int] identifier[propertyValueNew] operator[SEP] {
Keyword[if] operator[SEP] identifier[propertyName] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[Object] identifier[propertyValueOld] operator[=] identifier[getProperty] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[propertyValueOld] Keyword[instanceof] identifier[Integer] operator[SEP] {
Keyword[int] identifier[valueOld] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[propertyValueOld] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[valueOld] operator[==] identifier[propertyValueNew] operator[SEP] Keyword[return] literal[boolean] operator[SEP]
}
identifier[beforeChange] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[put] operator[SEP] identifier[propertyName] , identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[propertyValueNew] operator[SEP] operator[SEP] operator[SEP] identifier[afterChange] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] identifier[setModified] operator[SEP] identifier[propertyName] , literal[boolean] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP]
}
|
public static void appendBytes(final File dest, final byte[] data, final int off, final int len) throws IOException {
outBytes(dest, data, off, len, true);
} | class class_name[name] begin[{]
method[appendBytes, return_type[void], modifier[public static], parameter[dest, data, off, len]] begin[{]
call[.outBytes, parameter[member[.dest], member[.data], member[.off], member[.len], literal[true]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[appendBytes] operator[SEP] Keyword[final] identifier[File] identifier[dest] , Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[data] , Keyword[final] Keyword[int] identifier[off] , Keyword[final] Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[outBytes] operator[SEP] identifier[dest] , identifier[data] , identifier[off] , identifier[len] , literal[boolean] operator[SEP] operator[SEP]
}
|
private void removeAllResourcesFromViewRoot(final FacesContext context,
final List<UIComponent> resources,
final UIViewRoot view) {
final Iterator<UIComponent> it = resources.iterator();
while (it.hasNext()) {
final UIComponent resource = it.next();
final String resourceLibrary = (String) resource.getAttributes().get("library");
removeResource(context, resource, view);
if (resourceLibrary != null && resourceLibrary.startsWith("butterfaces"))
it.remove();
}
} | class class_name[name] begin[{]
method[removeAllResourcesFromViewRoot, return_type[void], modifier[private], parameter[context, resources, view]] begin[{]
local_variable[type[Iterator], it]
while[call[it.hasNext, parameter[]]] begin[{]
local_variable[type[UIComponent], resource]
local_variable[type[String], resourceLibrary]
call[.removeResource, parameter[member[.context], member[.resource], member[.view]]]
if[binary_operation[binary_operation[member[.resourceLibrary], !=, literal[null]], &&, call[resourceLibrary.startsWith, parameter[literal["butterfaces"]]]]] begin[{]
call[it.remove, parameter[]]
else begin[{]
None
end[}]
end[}]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[removeAllResourcesFromViewRoot] operator[SEP] Keyword[final] identifier[FacesContext] identifier[context] , Keyword[final] identifier[List] operator[<] identifier[UIComponent] operator[>] identifier[resources] , Keyword[final] identifier[UIViewRoot] identifier[view] operator[SEP] {
Keyword[final] identifier[Iterator] operator[<] identifier[UIComponent] operator[>] identifier[it] operator[=] identifier[resources] 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] {
Keyword[final] identifier[UIComponent] identifier[resource] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[resourceLibrary] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[resource] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[removeResource] operator[SEP] identifier[context] , identifier[resource] , identifier[view] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resourceLibrary] operator[!=] Other[null] operator[&&] identifier[resourceLibrary] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP]
}
}
|
public synchronized Time toTime(Calendar cal, String s) throws SQLException {
// 1) Parse backend string
if (s == null) {
return null;
}
ParsedTimestamp ts = parseBackendTimestamp(s);
Calendar useCal = ts.tz != null ? ts.tz : setupCalendar(cal);
if (ts.tz == null) {
// When no time zone provided (e.g. time or timestamp)
// We get the year-month-day from the string, then truncate the day to 1970-01-01
// This is used for timestamp -> time conversion
// Note: this cannot be merged with "else" branch since
// timestamps at which the time flips to/from DST depend on the date
// For instance, 2000-03-26 02:00:00 is invalid timestamp in Europe/Moscow time zone
// and the valid one is 2000-03-26 03:00:00. That is why we parse full timestamp
// then set year to 1970 later
useCal.set(Calendar.ERA, ts.era);
useCal.set(Calendar.YEAR, ts.year);
useCal.set(Calendar.MONTH, ts.month - 1);
useCal.set(Calendar.DAY_OF_MONTH, ts.day);
} else {
// When time zone is given, we just pick the time part and assume date to be 1970-01-01
// this is used for time, timez, and timestamptz parsing
useCal.set(Calendar.ERA, GregorianCalendar.AD);
useCal.set(Calendar.YEAR, 1970);
useCal.set(Calendar.MONTH, Calendar.JANUARY);
useCal.set(Calendar.DAY_OF_MONTH, 1);
}
useCal.set(Calendar.HOUR_OF_DAY, ts.hour);
useCal.set(Calendar.MINUTE, ts.minute);
useCal.set(Calendar.SECOND, ts.second);
useCal.set(Calendar.MILLISECOND, 0);
long timeMillis = useCal.getTimeInMillis() + ts.nanos / 1000000;
if (ts.tz != null || (ts.year == 1970 && ts.era == GregorianCalendar.AD)) {
// time with time zone has proper time zone, so the value can be returned as is
return new Time(timeMillis);
}
// 2) Truncate date part so in given time zone the date would be formatted as 01/01/1970
return convertToTime(timeMillis, useCal == null ? null : useCal.getTimeZone());
} | class class_name[name] begin[{]
method[toTime, return_type[type[Time]], modifier[synchronized public], parameter[cal, s]] begin[{]
if[binary_operation[member[.s], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[ParsedTimestamp], ts]
local_variable[type[Calendar], useCal]
if[binary_operation[member[ts.tz], ==, literal[null]]] begin[{]
call[useCal.set, parameter[member[Calendar.ERA], member[ts.era]]]
call[useCal.set, parameter[member[Calendar.YEAR], member[ts.year]]]
call[useCal.set, parameter[member[Calendar.MONTH], binary_operation[member[ts.month], -, literal[1]]]]
call[useCal.set, parameter[member[Calendar.DAY_OF_MONTH], member[ts.day]]]
else begin[{]
call[useCal.set, parameter[member[Calendar.ERA], member[GregorianCalendar.AD]]]
call[useCal.set, parameter[member[Calendar.YEAR], literal[1970]]]
call[useCal.set, parameter[member[Calendar.MONTH], member[Calendar.JANUARY]]]
call[useCal.set, parameter[member[Calendar.DAY_OF_MONTH], literal[1]]]
end[}]
call[useCal.set, parameter[member[Calendar.HOUR_OF_DAY], member[ts.hour]]]
call[useCal.set, parameter[member[Calendar.MINUTE], member[ts.minute]]]
call[useCal.set, parameter[member[Calendar.SECOND], member[ts.second]]]
call[useCal.set, parameter[member[Calendar.MILLISECOND], literal[0]]]
local_variable[type[long], timeMillis]
if[binary_operation[binary_operation[member[ts.tz], !=, literal[null]], ||, binary_operation[binary_operation[member[ts.year], ==, literal[1970]], &&, binary_operation[member[ts.era], ==, member[GregorianCalendar.AD]]]]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=timeMillis, 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=Time, sub_type=None))]
else begin[{]
None
end[}]
return[call[.convertToTime, parameter[member[.timeMillis], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=useCal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=getTimeZone, postfix_operators=[], prefix_operators=[], qualifier=useCal, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))]]]
end[}]
END[}] | Keyword[public] Keyword[synchronized] identifier[Time] identifier[toTime] operator[SEP] identifier[Calendar] identifier[cal] , identifier[String] identifier[s] operator[SEP] Keyword[throws] identifier[SQLException] {
Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
identifier[ParsedTimestamp] identifier[ts] operator[=] identifier[parseBackendTimestamp] operator[SEP] identifier[s] operator[SEP] operator[SEP] identifier[Calendar] identifier[useCal] operator[=] identifier[ts] operator[SEP] identifier[tz] operator[!=] Other[null] operator[?] identifier[ts] operator[SEP] identifier[tz] operator[:] identifier[setupCalendar] operator[SEP] identifier[cal] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ts] operator[SEP] identifier[tz] operator[==] Other[null] operator[SEP] {
identifier[useCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[ERA] , identifier[ts] operator[SEP] identifier[era] operator[SEP] operator[SEP] identifier[useCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[YEAR] , identifier[ts] operator[SEP] identifier[year] operator[SEP] operator[SEP] identifier[useCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[MONTH] , identifier[ts] operator[SEP] identifier[month] operator[-] Other[1] operator[SEP] operator[SEP] identifier[useCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[DAY_OF_MONTH] , identifier[ts] operator[SEP] identifier[day] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[useCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[ERA] , identifier[GregorianCalendar] operator[SEP] identifier[AD] operator[SEP] operator[SEP] identifier[useCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[YEAR] , Other[1970] operator[SEP] operator[SEP] identifier[useCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[MONTH] , identifier[Calendar] operator[SEP] identifier[JANUARY] operator[SEP] operator[SEP] identifier[useCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[DAY_OF_MONTH] , Other[1] operator[SEP] operator[SEP]
}
identifier[useCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[HOUR_OF_DAY] , identifier[ts] operator[SEP] identifier[hour] operator[SEP] operator[SEP] identifier[useCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[MINUTE] , identifier[ts] operator[SEP] identifier[minute] operator[SEP] operator[SEP] identifier[useCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[SECOND] , identifier[ts] operator[SEP] identifier[second] operator[SEP] operator[SEP] identifier[useCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[MILLISECOND] , Other[0] operator[SEP] operator[SEP] Keyword[long] identifier[timeMillis] operator[=] identifier[useCal] operator[SEP] identifier[getTimeInMillis] operator[SEP] operator[SEP] operator[+] identifier[ts] operator[SEP] identifier[nanos] operator[/] Other[1000000] operator[SEP] Keyword[if] operator[SEP] identifier[ts] operator[SEP] identifier[tz] operator[!=] Other[null] operator[||] operator[SEP] identifier[ts] operator[SEP] identifier[year] operator[==] Other[1970] operator[&&] identifier[ts] operator[SEP] identifier[era] operator[==] identifier[GregorianCalendar] operator[SEP] identifier[AD] operator[SEP] operator[SEP] {
Keyword[return] Keyword[new] identifier[Time] operator[SEP] identifier[timeMillis] operator[SEP] operator[SEP]
}
Keyword[return] identifier[convertToTime] operator[SEP] identifier[timeMillis] , identifier[useCal] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[useCal] operator[SEP] identifier[getTimeZone] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
|
private List<Entry<V>> filterEntryListLowerBound(List<Entry<V>> entryList, long scn) {
List<Entry<V>> result = new ArrayList<Entry<V>>(entryList.size());
for (Entry<V> e : entryList) {
if (scn <= e.getMinScn()) {
result.add(e);
}
}
return result;
} | class class_name[name] begin[{]
method[filterEntryListLowerBound, return_type[type[List]], modifier[private], parameter[entryList, scn]] begin[{]
local_variable[type[List], result]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=scn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getMinScn, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=entryList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None)
return[member[.result]]
end[}]
END[}] | Keyword[private] identifier[List] operator[<] identifier[Entry] operator[<] identifier[V] operator[>] operator[>] identifier[filterEntryListLowerBound] operator[SEP] identifier[List] operator[<] identifier[Entry] operator[<] identifier[V] operator[>] operator[>] identifier[entryList] , Keyword[long] identifier[scn] operator[SEP] {
identifier[List] operator[<] identifier[Entry] operator[<] identifier[V] operator[>] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Entry] operator[<] identifier[V] operator[>] operator[>] operator[SEP] identifier[entryList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[V] operator[>] identifier[e] operator[:] identifier[entryList] operator[SEP] {
Keyword[if] operator[SEP] identifier[scn] operator[<=] identifier[e] operator[SEP] identifier[getMinScn] operator[SEP] operator[SEP] operator[SEP] {
identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[e] operator[SEP] operator[SEP]
}
}
Keyword[return] identifier[result] operator[SEP]
}
|
protected void registerDraggableAttributes() {
addAttributeProcessor(new BlockInputLmlAttribute(), "blockInput");
addAttributeProcessor(new DeadzoneRadiusLmlAttribute(), "deadzone", "deadzoneRadius");
addAttributeProcessor(new DraggedAlphaLmlAttribute(), "alpha");
addAttributeProcessor(new DraggedFadingInterpolationLmlAttribute(), "fadingInterpolation");
addAttributeProcessor(new DraggedFadingTimeLmlAttribute(), "fadingTime");
addAttributeProcessor(new DraggedMovingInterpolationLmlAttribute(), "movingInterpolation");
addAttributeProcessor(new DraggedMovingTimeLmlAttribute(), "movingTime");
addAttributeProcessor(new DragListenerLmlAttribute(), "listener");
addAttributeProcessor(new InvisibleWhenDraggedLmlAttribute(), "invisible", "invisibleWhenDragged");
addAttributeProcessor(new KeepDraggedWithinParentLmlAttribute(), "keepWithinParent");
} | class class_name[name] begin[{]
method[registerDraggableAttributes, return_type[void], modifier[protected], parameter[]] begin[{]
call[.addAttributeProcessor, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BlockInputLmlAttribute, sub_type=None)), literal["blockInput"]]]
call[.addAttributeProcessor, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DeadzoneRadiusLmlAttribute, sub_type=None)), literal["deadzone"], literal["deadzoneRadius"]]]
call[.addAttributeProcessor, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DraggedAlphaLmlAttribute, sub_type=None)), literal["alpha"]]]
call[.addAttributeProcessor, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DraggedFadingInterpolationLmlAttribute, sub_type=None)), literal["fadingInterpolation"]]]
call[.addAttributeProcessor, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DraggedFadingTimeLmlAttribute, sub_type=None)), literal["fadingTime"]]]
call[.addAttributeProcessor, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DraggedMovingInterpolationLmlAttribute, sub_type=None)), literal["movingInterpolation"]]]
call[.addAttributeProcessor, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DraggedMovingTimeLmlAttribute, sub_type=None)), literal["movingTime"]]]
call[.addAttributeProcessor, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DragListenerLmlAttribute, sub_type=None)), literal["listener"]]]
call[.addAttributeProcessor, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvisibleWhenDraggedLmlAttribute, sub_type=None)), literal["invisible"], literal["invisibleWhenDragged"]]]
call[.addAttributeProcessor, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=KeepDraggedWithinParentLmlAttribute, sub_type=None)), literal["keepWithinParent"]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[registerDraggableAttributes] operator[SEP] operator[SEP] {
identifier[addAttributeProcessor] operator[SEP] Keyword[new] identifier[BlockInputLmlAttribute] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[addAttributeProcessor] operator[SEP] Keyword[new] identifier[DeadzoneRadiusLmlAttribute] operator[SEP] operator[SEP] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[addAttributeProcessor] operator[SEP] Keyword[new] identifier[DraggedAlphaLmlAttribute] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[addAttributeProcessor] operator[SEP] Keyword[new] identifier[DraggedFadingInterpolationLmlAttribute] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[addAttributeProcessor] operator[SEP] Keyword[new] identifier[DraggedFadingTimeLmlAttribute] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[addAttributeProcessor] operator[SEP] Keyword[new] identifier[DraggedMovingInterpolationLmlAttribute] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[addAttributeProcessor] operator[SEP] Keyword[new] identifier[DraggedMovingTimeLmlAttribute] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[addAttributeProcessor] operator[SEP] Keyword[new] identifier[DragListenerLmlAttribute] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[addAttributeProcessor] operator[SEP] Keyword[new] identifier[InvisibleWhenDraggedLmlAttribute] operator[SEP] operator[SEP] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[addAttributeProcessor] operator[SEP] Keyword[new] identifier[KeepDraggedWithinParentLmlAttribute] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP]
}
|
private void processBeanInterceptors() // d630717
throws EJBConfigurationException
{
ivBeanInterceptorProxyMap = createInterceptorProxyMap(ivEjbClass, -1);
// F743-1751 - Not all bean types collect bean methods. For those
// that do, find the methods that are declared on the bean.
if (ivBeanLifecycleMethods != null)
{
for (InterceptorMethodKind kind : InterceptorMethodKind.values())
{
int mid = kind.getMethodID();
if (mid != -1)
{
List<InterceptorProxy> proxyList = ivBeanInterceptorProxyMap.get(kind);
if (proxyList != null)
{
for (InterceptorProxy proxy : proxyList)
{
Method m = proxy.ivInterceptorMethod;
if (m.getDeclaringClass() == ivEjbClass)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "found bean " + LifecycleInterceptorWrapper.TRACE_NAMES[mid] + " method: " + m);
ivBeanLifecycleMethods[mid] = m;
break;
}
}
}
}
}
}
} | class class_name[name] begin[{]
method[processBeanInterceptors, return_type[void], modifier[private], parameter[]] begin[{]
assign[member[.ivBeanInterceptorProxyMap], call[.createInterceptorProxyMap, parameter[member[.ivEjbClass], literal[1]]]]
if[binary_operation[member[.ivBeanLifecycleMethods], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getMethodID, postfix_operators=[], prefix_operators=[], qualifier=kind, selectors=[], type_arguments=None), name=mid)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=mid, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=kind, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=ivBeanInterceptorProxyMap, selectors=[], type_arguments=None), name=proxyList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=InterceptorProxy, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=proxyList, 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=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=ivInterceptorMethod, postfix_operators=[], prefix_operators=[], qualifier=proxy, selectors=[]), name=m)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getDeclaringClass, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), operandr=MemberReference(member=ivEjbClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[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=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="found bean "), operandr=MemberReference(member=TRACE_NAMES, postfix_operators=[], prefix_operators=[], qualifier=LifecycleInterceptorWrapper, selectors=[ArraySelector(index=MemberReference(member=mid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" method: "), operator=+), operandr=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=ivBeanLifecycleMethods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=mid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=proxyList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=proxy)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InterceptorProxy, sub_type=None))), label=None)]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=InterceptorMethodKind, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=kind)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InterceptorMethodKind, sub_type=None))), label=None)
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[processBeanInterceptors] operator[SEP] operator[SEP] Keyword[throws] identifier[EJBConfigurationException] {
identifier[ivBeanInterceptorProxyMap] operator[=] identifier[createInterceptorProxyMap] operator[SEP] identifier[ivEjbClass] , operator[-] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ivBeanLifecycleMethods] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] identifier[InterceptorMethodKind] identifier[kind] operator[:] identifier[InterceptorMethodKind] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] {
Keyword[int] identifier[mid] operator[=] identifier[kind] operator[SEP] identifier[getMethodID] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mid] operator[!=] operator[-] Other[1] operator[SEP] {
identifier[List] operator[<] identifier[InterceptorProxy] operator[>] identifier[proxyList] operator[=] identifier[ivBeanInterceptorProxyMap] operator[SEP] identifier[get] operator[SEP] identifier[kind] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[proxyList] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] identifier[InterceptorProxy] identifier[proxy] operator[:] identifier[proxyList] operator[SEP] {
identifier[Method] identifier[m] operator[=] identifier[proxy] operator[SEP] identifier[ivInterceptorMethod] operator[SEP] Keyword[if] operator[SEP] identifier[m] operator[SEP] identifier[getDeclaringClass] operator[SEP] operator[SEP] operator[==] identifier[ivEjbClass] 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[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[LifecycleInterceptorWrapper] operator[SEP] identifier[TRACE_NAMES] operator[SEP] identifier[mid] operator[SEP] operator[+] literal[String] operator[+] identifier[m] operator[SEP] operator[SEP] identifier[ivBeanLifecycleMethods] operator[SEP] identifier[mid] operator[SEP] operator[=] identifier[m] operator[SEP] Keyword[break] operator[SEP]
}
}
}
}
}
}
}
|
public static void tweetEntity(final Activity context, final Entity entity, final String text, final SocialNetworkShareListener listener) {
if(proxy.isLinked(context)) {
proxy.tweetEntity(context, entity, text, listener);
}
else {
proxy.link(context, new SocializeAuthListener() {
@Override
public void onError(SocializeException error) {
if(listener != null) {
listener.onNetworkError(context, SocialNetwork.TWITTER, error);
}
}
@Override
public void onCancel() {
if(listener != null) {
listener.onCancel();
}
}
@Override
public void onAuthSuccess(SocializeSession session) {
proxy.tweetEntity(context, entity, text, listener);
}
@Override
public void onAuthFail(SocializeException error) {
if(listener != null) {
listener.onNetworkError(context, SocialNetwork.TWITTER, error);
}
}
});
}
} | class class_name[name] begin[{]
method[tweetEntity, return_type[void], modifier[public static], parameter[context, entity, text, listener]] begin[{]
if[call[proxy.isLinked, parameter[member[.context]]]] begin[{]
call[proxy.tweetEntity, parameter[member[.context], member[.entity], member[.text], member[.listener]]]
else begin[{]
call[proxy.link, parameter[member[.context], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=TWITTER, postfix_operators=[], prefix_operators=[], qualifier=SocialNetwork, selectors=[]), MemberReference(member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onNetworkError, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=onError, parameters=[FormalParameter(annotations=[], modifiers=set(), name=error, type=ReferenceType(arguments=None, dimensions=[], name=SocializeException, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=onCancel, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=onCancel, parameters=[], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tweetEntity, postfix_operators=[], prefix_operators=[], qualifier=proxy, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onAuthSuccess, parameters=[FormalParameter(annotations=[], modifiers=set(), name=session, type=ReferenceType(arguments=None, dimensions=[], name=SocializeSession, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=TWITTER, postfix_operators=[], prefix_operators=[], qualifier=SocialNetwork, selectors=[]), MemberReference(member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onNetworkError, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=onAuthFail, parameters=[FormalParameter(annotations=[], modifiers=set(), name=error, type=ReferenceType(arguments=None, dimensions=[], name=SocializeException, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SocializeAuthListener, sub_type=None))]]
end[}]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[tweetEntity] operator[SEP] Keyword[final] identifier[Activity] identifier[context] , Keyword[final] identifier[Entity] identifier[entity] , Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[SocialNetworkShareListener] identifier[listener] operator[SEP] {
Keyword[if] operator[SEP] identifier[proxy] operator[SEP] identifier[isLinked] operator[SEP] identifier[context] operator[SEP] operator[SEP] {
identifier[proxy] operator[SEP] identifier[tweetEntity] operator[SEP] identifier[context] , identifier[entity] , identifier[text] , identifier[listener] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[proxy] operator[SEP] identifier[link] operator[SEP] identifier[context] , Keyword[new] identifier[SocializeAuthListener] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onError] operator[SEP] identifier[SocializeException] identifier[error] operator[SEP] {
Keyword[if] operator[SEP] identifier[listener] operator[!=] Other[null] operator[SEP] {
identifier[listener] operator[SEP] identifier[onNetworkError] operator[SEP] identifier[context] , identifier[SocialNetwork] operator[SEP] identifier[TWITTER] , identifier[error] operator[SEP] operator[SEP]
}
} annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onCancel] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[listener] operator[!=] Other[null] operator[SEP] {
identifier[listener] operator[SEP] identifier[onCancel] operator[SEP] operator[SEP] operator[SEP]
}
} annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onAuthSuccess] operator[SEP] identifier[SocializeSession] identifier[session] operator[SEP] {
identifier[proxy] operator[SEP] identifier[tweetEntity] operator[SEP] identifier[context] , identifier[entity] , identifier[text] , identifier[listener] operator[SEP] operator[SEP]
} annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onAuthFail] operator[SEP] identifier[SocializeException] identifier[error] operator[SEP] {
Keyword[if] operator[SEP] identifier[listener] operator[!=] Other[null] operator[SEP] {
identifier[listener] operator[SEP] identifier[onNetworkError] operator[SEP] identifier[context] , identifier[SocialNetwork] operator[SEP] identifier[TWITTER] , identifier[error] operator[SEP] operator[SEP]
}
}
} operator[SEP] operator[SEP]
}
}
|
public void setMaxValue(final double VALUE) {
if (Status.RUNNING == timeline.getStatus()) { timeline.jumpTo(Duration.ONE); }
if (null == maxValue) {
if (VALUE < getMinValue()) { setMinValue(VALUE); }
_maxValue = clamp(getMinValue(), Double.MAX_VALUE, VALUE);
setRange(_maxValue - getMinValue());
if (Helper.equals(originalMaxValue, Double.MAX_VALUE)) originalMaxValue = _maxValue;
if (Helper.biggerThan(originalThreshold, getThreshold())) { setThreshold(clamp(getMinValue(), _maxValue, originalThreshold)); }
fireTileEvent(RECALC_EVENT);
if (!valueProperty().isBound()) Tile.this.setValue(clamp(getMinValue(), getMaxValue(), Tile.this.getValue()));
} else {
maxValue.set(VALUE);
}
} | class class_name[name] begin[{]
method[setMaxValue, return_type[void], modifier[public], parameter[VALUE]] begin[{]
if[binary_operation[member[Status.RUNNING], ==, call[timeline.getStatus, parameter[]]]] begin[{]
call[timeline.jumpTo, parameter[member[Duration.ONE]]]
else begin[{]
None
end[}]
if[binary_operation[literal[null], ==, member[.maxValue]]] begin[{]
if[binary_operation[member[.VALUE], <, call[.getMinValue, parameter[]]]] begin[{]
call[.setMinValue, parameter[member[.VALUE]]]
else begin[{]
None
end[}]
assign[member[._maxValue], call[.clamp, parameter[call[.getMinValue, parameter[]], member[Double.MAX_VALUE], member[.VALUE]]]]
call[.setRange, parameter[binary_operation[member[._maxValue], -, call[.getMinValue, parameter[]]]]]
if[call[Helper.equals, parameter[member[.originalMaxValue], member[Double.MAX_VALUE]]]] begin[{]
assign[member[.originalMaxValue], member[._maxValue]]
else begin[{]
None
end[}]
if[call[Helper.biggerThan, parameter[member[.originalThreshold], call[.getThreshold, parameter[]]]]] begin[{]
call[.setThreshold, parameter[call[.clamp, parameter[call[.getMinValue, parameter[]], member[._maxValue], member[.originalThreshold]]]]]
else begin[{]
None
end[}]
call[.fireTileEvent, parameter[member[.RECALC_EVENT]]]
if[call[.valueProperty, parameter[]]] begin[{]
THIS[call[None.setValue, parameter[call[.clamp, parameter[call[.getMinValue, parameter[]], call[.getMaxValue, parameter[]], THIS[call[None.getValue, parameter[]]]]]]]]
else begin[{]
None
end[}]
else begin[{]
call[maxValue.set, parameter[member[.VALUE]]]
end[}]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[setMaxValue] operator[SEP] Keyword[final] Keyword[double] identifier[VALUE] operator[SEP] {
Keyword[if] operator[SEP] identifier[Status] operator[SEP] identifier[RUNNING] operator[==] identifier[timeline] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] {
identifier[timeline] operator[SEP] identifier[jumpTo] operator[SEP] identifier[Duration] operator[SEP] identifier[ONE] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] Other[null] operator[==] identifier[maxValue] operator[SEP] {
Keyword[if] operator[SEP] identifier[VALUE] operator[<] identifier[getMinValue] operator[SEP] operator[SEP] operator[SEP] {
identifier[setMinValue] operator[SEP] identifier[VALUE] operator[SEP] operator[SEP]
}
identifier[_maxValue] operator[=] identifier[clamp] operator[SEP] identifier[getMinValue] operator[SEP] operator[SEP] , identifier[Double] operator[SEP] identifier[MAX_VALUE] , identifier[VALUE] operator[SEP] operator[SEP] identifier[setRange] operator[SEP] identifier[_maxValue] operator[-] identifier[getMinValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Helper] operator[SEP] identifier[equals] operator[SEP] identifier[originalMaxValue] , identifier[Double] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] identifier[originalMaxValue] operator[=] identifier[_maxValue] operator[SEP] Keyword[if] operator[SEP] identifier[Helper] operator[SEP] identifier[biggerThan] operator[SEP] identifier[originalThreshold] , identifier[getThreshold] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[setThreshold] operator[SEP] identifier[clamp] operator[SEP] identifier[getMinValue] operator[SEP] operator[SEP] , identifier[_maxValue] , identifier[originalThreshold] operator[SEP] operator[SEP] operator[SEP]
}
identifier[fireTileEvent] operator[SEP] identifier[RECALC_EVENT] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[valueProperty] operator[SEP] operator[SEP] operator[SEP] identifier[isBound] operator[SEP] operator[SEP] operator[SEP] identifier[Tile] operator[SEP] Keyword[this] operator[SEP] identifier[setValue] operator[SEP] identifier[clamp] operator[SEP] identifier[getMinValue] operator[SEP] operator[SEP] , identifier[getMaxValue] operator[SEP] operator[SEP] , identifier[Tile] operator[SEP] Keyword[this] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[maxValue] operator[SEP] identifier[set] operator[SEP] identifier[VALUE] operator[SEP] operator[SEP]
}
}
|
void storeJobExecutionInfo() {
if (this.jobHistoryStoreOptional.isPresent()) {
try {
this.logger.info("Writing job execution information to the job history store");
this.jobHistoryStoreOptional.get().put(this.jobState.toJobExecutionInfo());
} catch (IOException ioe) {
this.logger.error("Failed to write job execution information to the job history store: " + ioe, ioe);
}
}
} | class class_name[name] begin[{]
method[storeJobExecutionInfo, return_type[void], modifier[default], parameter[]] begin[{]
if[THIS[member[None.jobHistoryStoreOptional]call[None.isPresent, parameter[]]]] begin[{]
TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=logger, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Writing job execution information to the job history store")], member=info, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=jobHistoryStoreOptional, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=jobState, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=toJobExecutionInfo, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=logger, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to write job execution information to the job history store: "), operandr=MemberReference(member=ioe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=ioe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ioe, types=['IOException']))], finally_block=None, label=None, resources=None)
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[void] identifier[storeJobExecutionInfo] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[jobHistoryStoreOptional] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] {
Keyword[try] {
Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[jobHistoryStoreOptional] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] Keyword[this] operator[SEP] identifier[jobState] operator[SEP] identifier[toJobExecutionInfo] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] {
Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[ioe] , identifier[ioe] operator[SEP] operator[SEP]
}
}
}
|
public ParameterDescription.InDefinedShape get(int index) {
int offset = declaringMethod.isStatic() ? 0 : 1;
for (ParameterDescription.Token token : tokens.subList(0, index)) {
offset += token.getType().getStackSize().getSize();
}
return new ParameterDescription.Latent(declaringMethod, tokens.get(index), index, offset);
} | class class_name[name] begin[{]
method[get, return_type[type[ParameterDescription]], modifier[public], parameter[index]] begin[{]
local_variable[type[int], offset]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=token, selectors=[MethodInvocation(arguments=[], member=getStackSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=subList, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=token)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ParameterDescription, sub_type=ReferenceType(arguments=None, dimensions=None, name=Token, sub_type=None)))), label=None)
return[ClassCreator(arguments=[MemberReference(member=declaringMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None), MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=offset, 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=ParameterDescription, sub_type=ReferenceType(arguments=None, dimensions=None, name=Latent, sub_type=None)))]
end[}]
END[}] | Keyword[public] identifier[ParameterDescription] operator[SEP] identifier[InDefinedShape] identifier[get] operator[SEP] Keyword[int] identifier[index] operator[SEP] {
Keyword[int] identifier[offset] operator[=] identifier[declaringMethod] operator[SEP] identifier[isStatic] operator[SEP] operator[SEP] operator[?] Other[0] operator[:] Other[1] operator[SEP] Keyword[for] operator[SEP] identifier[ParameterDescription] operator[SEP] identifier[Token] identifier[token] operator[:] identifier[tokens] operator[SEP] identifier[subList] operator[SEP] Other[0] , identifier[index] operator[SEP] operator[SEP] {
identifier[offset] operator[+=] identifier[token] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[getStackSize] operator[SEP] operator[SEP] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] Keyword[new] identifier[ParameterDescription] operator[SEP] identifier[Latent] operator[SEP] identifier[declaringMethod] , identifier[tokens] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] , identifier[index] , identifier[offset] operator[SEP] operator[SEP]
}
|
@Override
public <T> EventMessage<T> onEventRegistered(UnitOfWork unitOfWork, EventMessage<T> event) {
return event.withMetaData(Collections.singletonMap(CorrelationToken.KEY, correlationToken));
} | class class_name[name] begin[{]
method[onEventRegistered, return_type[type[EventMessage]], modifier[public], parameter[unitOfWork, event]] begin[{]
return[call[event.withMetaData, parameter[call[Collections.singletonMap, parameter[member[CorrelationToken.KEY], member[.correlationToken]]]]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[EventMessage] operator[<] identifier[T] operator[>] identifier[onEventRegistered] operator[SEP] identifier[UnitOfWork] identifier[unitOfWork] , identifier[EventMessage] operator[<] identifier[T] operator[>] identifier[event] operator[SEP] {
Keyword[return] identifier[event] operator[SEP] identifier[withMetaData] operator[SEP] identifier[Collections] operator[SEP] identifier[singletonMap] operator[SEP] identifier[CorrelationToken] operator[SEP] identifier[KEY] , identifier[correlationToken] operator[SEP] operator[SEP] operator[SEP]
}
|
@Override
public EClass getIfcBoxedHalfSpace() {
if (ifcBoxedHalfSpaceEClass == null) {
ifcBoxedHalfSpaceEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(56);
}
return ifcBoxedHalfSpaceEClass;
} | class class_name[name] begin[{]
method[getIfcBoxedHalfSpace, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcBoxedHalfSpaceEClass], ==, literal[null]]] begin[{]
assign[member[.ifcBoxedHalfSpaceEClass], 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=56)], 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[.ifcBoxedHalfSpaceEClass]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcBoxedHalfSpace] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcBoxedHalfSpaceEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcBoxedHalfSpaceEClass] 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[56] operator[SEP] operator[SEP]
}
Keyword[return] identifier[ifcBoxedHalfSpaceEClass] operator[SEP]
}
|
protected FacesBackingBean loadFacesBackingBean( RequestContext requestContext, String backingClassName )
{
try
{
Class backingClass = null;
try
{
backingClass = getFacesBackingBeanClass( backingClassName );
}
catch ( ClassNotFoundException e )
{
// ignore -- we deal with this and log this immediately below. getFacesBackingBeanClass() by default
// does not throw this exception, but a derived version might.
}
if ( backingClass == null )
{
if ( _log.isTraceEnabled() )
{
_log.trace( "No backing bean class " + backingClassName + " found for request "
+ requestContext.getHttpRequest().getRequestURI() );
}
}
else
{
AnnotationReader annReader = AnnotationReader.getAnnotationReader( backingClass, getServletContext() );
if ( annReader.getJpfAnnotation( backingClass, "FacesBacking" ) != null )
{
if ( _log.isDebugEnabled() )
{
_log.debug( "Found backing class " + backingClassName + " for request "
+ requestContext.getHttpRequest().getRequestURI() + "; creating a new instance." );
}
return getFacesBackingBeanInstance( backingClass );
}
else
{
if ( _log.isDebugEnabled() )
{
_log.debug( "Found matching backing class " + backingClassName + " for request "
+ requestContext.getHttpRequest().getRequestURI() + ", but it does not have the "
+ ANNOTATION_QUALIFIER + "FacesBacking" + " annotation." );
}
}
}
}
catch ( InstantiationException e )
{
_log.error( "Could not create backing bean instance of " + backingClassName, e );
}
catch ( IllegalAccessException e )
{
_log.error( "Could not create backing bean instance of " + backingClassName, e );
}
return null;
} | class class_name[name] begin[{]
method[loadFacesBackingBean, return_type[type[FacesBackingBean]], modifier[protected], parameter[requestContext, backingClassName]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=backingClass)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=backingClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=backingClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFacesBackingBeanClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backingClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=backingClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getServletContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=getAnnotationReader, postfix_operators=[], prefix_operators=[], qualifier=AnnotationReader, selectors=[], type_arguments=None), name=annReader)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AnnotationReader, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=backingClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="FacesBacking")], member=getJpfAnnotation, postfix_operators=[], prefix_operators=[], qualifier=annReader, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[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=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Found matching backing class "), operandr=MemberReference(member=backingClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" for request "), operator=+), operandr=MethodInvocation(arguments=[], member=getHttpRequest, postfix_operators=[], prefix_operators=[], qualifier=requestContext, selectors=[MethodInvocation(arguments=[], member=getRequestURI, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", but it does not have the "), operator=+), operandr=MemberReference(member=ANNOTATION_QUALIFIER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="FacesBacking"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" annotation."), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=_log, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[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=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Found backing class "), operandr=MemberReference(member=backingClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" for request "), operator=+), operandr=MethodInvocation(arguments=[], member=getHttpRequest, postfix_operators=[], prefix_operators=[], qualifier=requestContext, selectors=[MethodInvocation(arguments=[], member=getRequestURI, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="; creating a new instance."), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=_log, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=backingClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFacesBackingBeanInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isTraceEnabled, 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=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No backing bean class "), operandr=MemberReference(member=backingClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" found for request "), operator=+), operandr=MethodInvocation(arguments=[], member=getHttpRequest, postfix_operators=[], prefix_operators=[], qualifier=requestContext, selectors=[MethodInvocation(arguments=[], member=getRequestURI, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], member=trace, postfix_operators=[], prefix_operators=[], qualifier=_log, selectors=[], type_arguments=None), label=None)]))]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not create backing bean instance of "), operandr=MemberReference(member=backingClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=['InstantiationException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not create backing bean instance of "), operandr=MemberReference(member=backingClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=['IllegalAccessException']))], finally_block=None, label=None, resources=None)
return[literal[null]]
end[}]
END[}] | Keyword[protected] identifier[FacesBackingBean] identifier[loadFacesBackingBean] operator[SEP] identifier[RequestContext] identifier[requestContext] , identifier[String] identifier[backingClassName] operator[SEP] {
Keyword[try] {
identifier[Class] identifier[backingClass] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[backingClass] operator[=] identifier[getFacesBackingBeanClass] operator[SEP] identifier[backingClassName] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] {
}
Keyword[if] operator[SEP] identifier[backingClass] operator[==] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[_log] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[_log] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[+] identifier[backingClassName] operator[+] literal[String] operator[+] identifier[requestContext] operator[SEP] identifier[getHttpRequest] operator[SEP] operator[SEP] operator[SEP] identifier[getRequestURI] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[else] {
identifier[AnnotationReader] identifier[annReader] operator[=] identifier[AnnotationReader] operator[SEP] identifier[getAnnotationReader] operator[SEP] identifier[backingClass] , identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[annReader] operator[SEP] identifier[getJpfAnnotation] operator[SEP] identifier[backingClass] , literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] {
Keyword[if] operator[SEP] identifier[_log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[_log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[backingClassName] operator[+] literal[String] operator[+] identifier[requestContext] operator[SEP] identifier[getHttpRequest] operator[SEP] operator[SEP] operator[SEP] identifier[getRequestURI] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP]
}
Keyword[return] identifier[getFacesBackingBeanInstance] operator[SEP] identifier[backingClass] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[if] operator[SEP] identifier[_log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[_log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[backingClassName] operator[+] literal[String] operator[+] identifier[requestContext] operator[SEP] identifier[getHttpRequest] operator[SEP] operator[SEP] operator[SEP] identifier[getRequestURI] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[ANNOTATION_QUALIFIER] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP]
}
}
}
}
Keyword[catch] operator[SEP] identifier[InstantiationException] identifier[e] operator[SEP] {
identifier[_log] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[backingClassName] , identifier[e] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] {
identifier[_log] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[backingClassName] , identifier[e] operator[SEP] operator[SEP]
}
Keyword[return] Other[null] operator[SEP]
}
|
public final int hash(ByteBuffer buf, int seed) {
final int hash = hash(buf, buf.position(), buf.remaining(), seed);
buf.position(buf.limit());
return hash;
} | class class_name[name] begin[{]
method[hash, return_type[type[int]], modifier[final public], parameter[buf, seed]] begin[{]
local_variable[type[int], hash]
call[buf.position, parameter[call[buf.limit, parameter[]]]]
return[member[.hash]]
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[int] identifier[hash] operator[SEP] identifier[ByteBuffer] identifier[buf] , Keyword[int] identifier[seed] operator[SEP] {
Keyword[final] Keyword[int] identifier[hash] operator[=] identifier[hash] operator[SEP] identifier[buf] , identifier[buf] operator[SEP] identifier[position] operator[SEP] operator[SEP] , identifier[buf] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] , identifier[seed] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[position] operator[SEP] identifier[buf] operator[SEP] identifier[limit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[hash] operator[SEP]
}
|
public Record keep(String... columns) {
if (columns != null && columns.length > 0) {
Map<String, Object> newColumns = new HashMap<String, Object>(columns.length); // getConfig().containerFactory.getColumnsMap();
for (String c : columns)
if (this.getColumns().containsKey(c)) // prevent put null value to the newColumns
newColumns.put(c, this.getColumns().get(c));
this.getColumns().clear();
this.getColumns().putAll(newColumns);
}
else
this.getColumns().clear();
return this;
} | class class_name[name] begin[{]
method[keep, return_type[type[Record]], modifier[public], parameter[columns]] begin[{]
if[binary_operation[binary_operation[member[.columns], !=, literal[null]], &&, binary_operation[member[columns.length], >, literal[0]]]] begin[{]
local_variable[type[Map], newColumns]
ForStatement(body=IfStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getColumns, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getColumns, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=put, postfix_operators=[], prefix_operators=[], qualifier=newColumns, selectors=[], type_arguments=None), label=None)), control=EnhancedForControl(iterable=MemberReference(member=columns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)
THIS[call[None.getColumns, parameter[]]call[None.clear, parameter[]]]
THIS[call[None.getColumns, parameter[]]call[None.putAll, parameter[member[.newColumns]]]]
else begin[{]
THIS[call[None.getColumns, parameter[]]call[None.clear, parameter[]]]
end[}]
return[THIS[]]
end[}]
END[}] | Keyword[public] identifier[Record] identifier[keep] operator[SEP] identifier[String] operator[...] identifier[columns] operator[SEP] {
Keyword[if] operator[SEP] identifier[columns] operator[!=] Other[null] operator[&&] identifier[columns] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[newColumns] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] identifier[columns] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[c] operator[:] identifier[columns] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getColumns] operator[SEP] operator[SEP] operator[SEP] identifier[containsKey] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[newColumns] operator[SEP] identifier[put] operator[SEP] identifier[c] , Keyword[this] operator[SEP] identifier[getColumns] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[c] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getColumns] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getColumns] operator[SEP] operator[SEP] operator[SEP] identifier[putAll] operator[SEP] identifier[newColumns] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[this] operator[SEP] identifier[getColumns] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP]
}
|
public Object getProperty(String key)
{
if (overrideProperties.containsKey(key)) {
return overrideProperties.getProperty(key);
}
Configuration firstMatchingConfiguration = null;
for (Configuration config : configList)
{
if (config.containsKey(key))
{
firstMatchingConfiguration = config;
break;
}
}
if (firstMatchingConfiguration != null)
{
return firstMatchingConfiguration.getProperty(key);
}
else
{
return null;
}
} | class class_name[name] begin[{]
method[getProperty, return_type[type[Object]], modifier[public], parameter[key]] begin[{]
if[call[overrideProperties.containsKey, parameter[member[.key]]]] begin[{]
return[call[overrideProperties.getProperty, parameter[member[.key]]]]
else begin[{]
None
end[}]
local_variable[type[Configuration], firstMatchingConfiguration]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=firstMatchingConfiguration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=configList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=config)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Configuration, sub_type=None))), label=None)
if[binary_operation[member[.firstMatchingConfiguration], !=, literal[null]]] begin[{]
return[call[firstMatchingConfiguration.getProperty, parameter[member[.key]]]]
else begin[{]
return[literal[null]]
end[}]
end[}]
END[}] | Keyword[public] identifier[Object] identifier[getProperty] operator[SEP] identifier[String] identifier[key] operator[SEP] {
Keyword[if] operator[SEP] identifier[overrideProperties] operator[SEP] identifier[containsKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] {
Keyword[return] identifier[overrideProperties] operator[SEP] identifier[getProperty] operator[SEP] identifier[key] operator[SEP] operator[SEP]
}
identifier[Configuration] identifier[firstMatchingConfiguration] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Configuration] identifier[config] operator[:] identifier[configList] operator[SEP] {
Keyword[if] operator[SEP] identifier[config] operator[SEP] identifier[containsKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] {
identifier[firstMatchingConfiguration] operator[=] identifier[config] operator[SEP] Keyword[break] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[firstMatchingConfiguration] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[firstMatchingConfiguration] operator[SEP] identifier[getProperty] operator[SEP] identifier[key] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[return] Other[null] operator[SEP]
}
}
|
public static Writer leftShift(Writer self, Object value) throws IOException {
InvokerHelper.write(self, value);
return self;
} | class class_name[name] begin[{]
method[leftShift, return_type[type[Writer]], modifier[public static], parameter[self, value]] begin[{]
call[InvokerHelper.write, parameter[member[.self], member[.value]]]
return[member[.self]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[Writer] identifier[leftShift] operator[SEP] identifier[Writer] identifier[self] , identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[InvokerHelper] operator[SEP] identifier[write] operator[SEP] identifier[self] , identifier[value] operator[SEP] operator[SEP] Keyword[return] identifier[self] operator[SEP]
}
|
private static boolean isTopLevelAssignTarget(Node n) {
Node ancestor = n.getParent();
while (ancestor.isAssign()) {
ancestor = ancestor.getParent();
}
return ancestor.isExprResult();
} | class class_name[name] begin[{]
method[isTopLevelAssignTarget, return_type[type[boolean]], modifier[private static], parameter[n]] begin[{]
local_variable[type[Node], ancestor]
while[call[ancestor.isAssign, parameter[]]] begin[{]
assign[member[.ancestor], call[ancestor.getParent, parameter[]]]
end[}]
return[call[ancestor.isExprResult, parameter[]]]
end[}]
END[}] | Keyword[private] Keyword[static] Keyword[boolean] identifier[isTopLevelAssignTarget] operator[SEP] identifier[Node] identifier[n] operator[SEP] {
identifier[Node] identifier[ancestor] operator[=] identifier[n] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[ancestor] operator[SEP] identifier[isAssign] operator[SEP] operator[SEP] operator[SEP] {
identifier[ancestor] operator[=] identifier[ancestor] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] identifier[ancestor] operator[SEP] identifier[isExprResult] operator[SEP] operator[SEP] operator[SEP]
}
|
public JSONObject getOwned(String freelancerReference, HashMap<String, String> params) throws JSONException {
return oClient.get("/finreports/v2/financial_account_owner/" + freelancerReference, params);
} | class class_name[name] begin[{]
method[getOwned, return_type[type[JSONObject]], modifier[public], parameter[freelancerReference, params]] begin[{]
return[call[oClient.get, parameter[binary_operation[literal["/finreports/v2/financial_account_owner/"], +, member[.freelancerReference]], member[.params]]]]
end[}]
END[}] | Keyword[public] identifier[JSONObject] identifier[getOwned] operator[SEP] identifier[String] identifier[freelancerReference] , identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] operator[SEP] Keyword[throws] identifier[JSONException] {
Keyword[return] identifier[oClient] operator[SEP] identifier[get] operator[SEP] literal[String] operator[+] identifier[freelancerReference] , identifier[params] operator[SEP] operator[SEP]
}
|
public static void pack(ZipEntrySource[] entries, File zip) {
if (log.isDebugEnabled()) {
log.debug("Creating '{}' from {}.", zip, Arrays.asList(entries));
}
OutputStream out = null;
try {
out = new BufferedOutputStream(new FileOutputStream(zip));
pack(entries, out, true);
}
catch (IOException e) {
throw ZipExceptionUtil.rethrow(e);
}
finally {
IOUtils.closeQuietly(out);
}
} | class class_name[name] begin[{]
method[pack, return_type[void], modifier[public static], parameter[entries, zip]] begin[{]
if[call[log.isDebugEnabled, parameter[]]] begin[{]
call[log.debug, parameter[literal["Creating '{}' from {}."], member[.zip], call[Arrays.asList, parameter[member[.entries]]]]]
else begin[{]
None
end[}]
local_variable[type[OutputStream], out]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=zip, 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=FileOutputStream, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedOutputStream, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=entries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=pack, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rethrow, postfix_operators=[], prefix_operators=[], qualifier=ZipExceptionUtil, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=IOUtils, selectors=[], type_arguments=None), label=None)], label=None, resources=None)
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[pack] operator[SEP] identifier[ZipEntrySource] operator[SEP] operator[SEP] identifier[entries] , identifier[File] identifier[zip] operator[SEP] {
Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[zip] , identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[entries] operator[SEP] operator[SEP] operator[SEP]
}
identifier[OutputStream] identifier[out] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[out] operator[=] Keyword[new] identifier[BufferedOutputStream] operator[SEP] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[zip] operator[SEP] operator[SEP] operator[SEP] identifier[pack] operator[SEP] identifier[entries] , identifier[out] , literal[boolean] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] {
Keyword[throw] identifier[ZipExceptionUtil] operator[SEP] identifier[rethrow] operator[SEP] identifier[e] operator[SEP] operator[SEP]
}
Keyword[finally] {
identifier[IOUtils] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[out] operator[SEP] operator[SEP]
}
}
|
public static String generateIndexName(final BsonDocument index) {
StringBuilder indexName = new StringBuilder();
for (final String keyNames : index.keySet()) {
if (indexName.length() != 0) {
indexName.append('_');
}
indexName.append(keyNames).append('_');
BsonValue ascOrDescValue = index.get(keyNames);
if (ascOrDescValue instanceof BsonNumber) {
indexName.append(((BsonNumber) ascOrDescValue).intValue());
} else if (ascOrDescValue instanceof BsonString) {
indexName.append(((BsonString) ascOrDescValue).getValue().replace(' ', '_'));
}
}
return indexName.toString();
} | class class_name[name] begin[{]
method[generateIndexName, return_type[type[String]], modifier[public static], parameter[index]] begin[{]
local_variable[type[StringBuilder], indexName]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=indexName, selectors=[], type_arguments=None), 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=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='_')], member=append, postfix_operators=[], prefix_operators=[], qualifier=indexName, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=keyNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=indexName, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='_')], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=keyNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=index, selectors=[], type_arguments=None), name=ascOrDescValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BsonValue, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ascOrDescValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=BsonNumber, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ascOrDescValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=BsonString, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=ascOrDescValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BsonString, sub_type=None))], member=append, postfix_operators=[], prefix_operators=[], qualifier=indexName, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=ascOrDescValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BsonNumber, sub_type=None))], member=append, postfix_operators=[], prefix_operators=[], qualifier=indexName, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=index, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=keyNames)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)
return[call[indexName.toString, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[String] identifier[generateIndexName] operator[SEP] Keyword[final] identifier[BsonDocument] identifier[index] operator[SEP] {
identifier[StringBuilder] identifier[indexName] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[keyNames] operator[:] identifier[index] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[indexName] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] {
identifier[indexName] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
identifier[indexName] operator[SEP] identifier[append] operator[SEP] identifier[keyNames] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[BsonValue] identifier[ascOrDescValue] operator[=] identifier[index] operator[SEP] identifier[get] operator[SEP] identifier[keyNames] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ascOrDescValue] Keyword[instanceof] identifier[BsonNumber] operator[SEP] {
identifier[indexName] operator[SEP] identifier[append] operator[SEP] operator[SEP] operator[SEP] identifier[BsonNumber] operator[SEP] identifier[ascOrDescValue] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] Keyword[if] operator[SEP] identifier[ascOrDescValue] Keyword[instanceof] identifier[BsonString] operator[SEP] {
identifier[indexName] operator[SEP] identifier[append] operator[SEP] operator[SEP] operator[SEP] identifier[BsonString] operator[SEP] identifier[ascOrDescValue] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[return] identifier[indexName] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP]
}
|
protected void startHeartbeatForThisSession()
{
if (enableHeartbeat && !Strings.isNullOrEmpty(masterToken))
{
logger.debug("start heartbeat, master token validity: " +
masterTokenValidityInSeconds);
HeartbeatBackground.getInstance().addSession(this,
masterTokenValidityInSeconds, this.heartbeatFrequency);
}
else
{
logger.debug("heartbeat not enabled for the session");
}
} | class class_name[name] begin[{]
method[startHeartbeatForThisSession, return_type[void], modifier[protected], parameter[]] begin[{]
if[binary_operation[member[.enableHeartbeat], &&, call[Strings.isNullOrEmpty, parameter[member[.masterToken]]]]] begin[{]
call[logger.debug, parameter[binary_operation[literal["start heartbeat, master token validity: "], +, member[.masterTokenValidityInSeconds]]]]
call[HeartbeatBackground.getInstance, parameter[]]
else begin[{]
call[logger.debug, parameter[literal["heartbeat not enabled for the session"]]]
end[}]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[startHeartbeatForThisSession] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[enableHeartbeat] operator[&&] operator[!] identifier[Strings] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[masterToken] operator[SEP] operator[SEP] {
identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[masterTokenValidityInSeconds] operator[SEP] operator[SEP] identifier[HeartbeatBackground] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[addSession] operator[SEP] Keyword[this] , identifier[masterTokenValidityInSeconds] , Keyword[this] operator[SEP] identifier[heartbeatFrequency] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
}
|
@Override
public void getLikesByEntity(SocializeSession session, String key, int startIndex, int endIndex, LikeListener listener) {
listAsync(session, ENDPOINT, key, null, null, startIndex, endIndex, listener);
} | class class_name[name] begin[{]
method[getLikesByEntity, return_type[void], modifier[public], parameter[session, key, startIndex, endIndex, listener]] begin[{]
call[.listAsync, parameter[member[.session], member[.ENDPOINT], member[.key], literal[null], literal[null], member[.startIndex], member[.endIndex], member[.listener]]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[getLikesByEntity] operator[SEP] identifier[SocializeSession] identifier[session] , identifier[String] identifier[key] , Keyword[int] identifier[startIndex] , Keyword[int] identifier[endIndex] , identifier[LikeListener] identifier[listener] operator[SEP] {
identifier[listAsync] operator[SEP] identifier[session] , identifier[ENDPOINT] , identifier[key] , Other[null] , Other[null] , identifier[startIndex] , identifier[endIndex] , identifier[listener] operator[SEP] operator[SEP]
}
|
private VelocityContext createContext(String applicationName, List<Dependency> dependencies,
List<Analyzer> analyzers, DatabaseProperties properties) {
final DateTime dt = new DateTime();
final DateTimeFormatter dateFormat = DateTimeFormat.forPattern("MMM d, yyyy 'at' HH:mm:ss z");
final DateTimeFormatter dateFormatXML = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
final String scanDate = dateFormat.print(dt);
final String scanDateXML = dateFormatXML.print(dt);
final VelocityContext ctxt = new VelocityContext();
ctxt.put("applicationName", applicationName);
ctxt.put("dependencies", dependencies);
ctxt.put("analyzers", analyzers);
ctxt.put("properties", properties);
ctxt.put("scanDate", scanDate);
ctxt.put("scanDateXML", scanDateXML);
ctxt.put("enc", new EscapeTool());
ctxt.put("rpt", new ReportTool());
ctxt.put("WordUtils", new WordUtils());
ctxt.put("VENDOR", EvidenceType.VENDOR);
ctxt.put("PRODUCT", EvidenceType.PRODUCT);
ctxt.put("VERSION", EvidenceType.VERSION);
ctxt.put("version", settings.getString(Settings.KEYS.APPLICATION_VERSION, "Unknown"));
return ctxt;
} | class class_name[name] begin[{]
method[createContext, return_type[type[VelocityContext]], modifier[private], parameter[applicationName, dependencies, analyzers, properties]] begin[{]
local_variable[type[DateTime], dt]
local_variable[type[DateTimeFormatter], dateFormat]
local_variable[type[DateTimeFormatter], dateFormatXML]
local_variable[type[String], scanDate]
local_variable[type[String], scanDateXML]
local_variable[type[VelocityContext], ctxt]
call[ctxt.put, parameter[literal["applicationName"], member[.applicationName]]]
call[ctxt.put, parameter[literal["dependencies"], member[.dependencies]]]
call[ctxt.put, parameter[literal["analyzers"], member[.analyzers]]]
call[ctxt.put, parameter[literal["properties"], member[.properties]]]
call[ctxt.put, parameter[literal["scanDate"], member[.scanDate]]]
call[ctxt.put, parameter[literal["scanDateXML"], member[.scanDateXML]]]
call[ctxt.put, parameter[literal["enc"], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EscapeTool, sub_type=None))]]
call[ctxt.put, parameter[literal["rpt"], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ReportTool, sub_type=None))]]
call[ctxt.put, parameter[literal["WordUtils"], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WordUtils, sub_type=None))]]
call[ctxt.put, parameter[literal["VENDOR"], member[EvidenceType.VENDOR]]]
call[ctxt.put, parameter[literal["PRODUCT"], member[EvidenceType.PRODUCT]]]
call[ctxt.put, parameter[literal["VERSION"], member[EvidenceType.VERSION]]]
call[ctxt.put, parameter[literal["version"], call[settings.getString, parameter[member[Settings.KEYS.APPLICATION_VERSION], literal["Unknown"]]]]]
return[member[.ctxt]]
end[}]
END[}] | Keyword[private] identifier[VelocityContext] identifier[createContext] operator[SEP] identifier[String] identifier[applicationName] , identifier[List] operator[<] identifier[Dependency] operator[>] identifier[dependencies] , identifier[List] operator[<] identifier[Analyzer] operator[>] identifier[analyzers] , identifier[DatabaseProperties] identifier[properties] operator[SEP] {
Keyword[final] identifier[DateTime] identifier[dt] operator[=] Keyword[new] identifier[DateTime] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[DateTimeFormatter] identifier[dateFormat] operator[=] identifier[DateTimeFormat] operator[SEP] identifier[forPattern] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[DateTimeFormatter] identifier[dateFormatXML] operator[=] identifier[DateTimeFormat] operator[SEP] identifier[forPattern] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[scanDate] operator[=] identifier[dateFormat] operator[SEP] identifier[print] operator[SEP] identifier[dt] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[scanDateXML] operator[=] identifier[dateFormatXML] operator[SEP] identifier[print] operator[SEP] identifier[dt] operator[SEP] operator[SEP] Keyword[final] identifier[VelocityContext] identifier[ctxt] operator[=] Keyword[new] identifier[VelocityContext] operator[SEP] operator[SEP] operator[SEP] identifier[ctxt] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[applicationName] operator[SEP] operator[SEP] identifier[ctxt] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[dependencies] operator[SEP] operator[SEP] identifier[ctxt] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[analyzers] operator[SEP] operator[SEP] identifier[ctxt] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[properties] operator[SEP] operator[SEP] identifier[ctxt] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[scanDate] operator[SEP] operator[SEP] identifier[ctxt] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[scanDateXML] operator[SEP] operator[SEP] identifier[ctxt] operator[SEP] identifier[put] operator[SEP] literal[String] , Keyword[new] identifier[EscapeTool] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ctxt] operator[SEP] identifier[put] operator[SEP] literal[String] , Keyword[new] identifier[ReportTool] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ctxt] operator[SEP] identifier[put] operator[SEP] literal[String] , Keyword[new] identifier[WordUtils] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ctxt] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[EvidenceType] operator[SEP] identifier[VENDOR] operator[SEP] operator[SEP] identifier[ctxt] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[EvidenceType] operator[SEP] identifier[PRODUCT] operator[SEP] operator[SEP] identifier[ctxt] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[EvidenceType] operator[SEP] identifier[VERSION] operator[SEP] operator[SEP] identifier[ctxt] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[settings] operator[SEP] identifier[getString] operator[SEP] identifier[Settings] operator[SEP] identifier[KEYS] operator[SEP] identifier[APPLICATION_VERSION] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[ctxt] operator[SEP]
}
|
private static boolean compareDistance(final String title1, final String title2, int distance) {
return StringUtils.getLevenshteinDistance(title1, title2) <= distance;
} | class class_name[name] begin[{]
method[compareDistance, return_type[type[boolean]], modifier[private static], parameter[title1, title2, distance]] begin[{]
return[binary_operation[call[StringUtils.getLevenshteinDistance, parameter[member[.title1], member[.title2]]], <=, member[.distance]]]
end[}]
END[}] | Keyword[private] Keyword[static] Keyword[boolean] identifier[compareDistance] operator[SEP] Keyword[final] identifier[String] identifier[title1] , Keyword[final] identifier[String] identifier[title2] , Keyword[int] identifier[distance] operator[SEP] {
Keyword[return] identifier[StringUtils] operator[SEP] identifier[getLevenshteinDistance] operator[SEP] identifier[title1] , identifier[title2] operator[SEP] operator[<=] identifier[distance] operator[SEP]
}
|
@RequestMapping(value = DELETE_TARGET_URL, method = RequestMethod.POST)
public ResponseEntity<Void> deleteTarget(@PathVariable(ENV_PATH_VAR_NAME) String env,
@PathVariable(SITE_NAME_PATH_VAR_NAME) String siteName) throws DeployerException {
targetService.deleteTarget(env, siteName);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
} | class class_name[name] begin[{]
method[deleteTarget, return_type[type[ResponseEntity]], modifier[public], parameter[env, siteName]] begin[{]
call[targetService.deleteTarget, parameter[member[.env], member[.siteName]]]
return[ClassCreator(arguments=[MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=HttpStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ResponseEntity, sub_type=None))]
end[}]
END[}] | annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] identifier[DELETE_TARGET_URL] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[POST] operator[SEP] Keyword[public] identifier[ResponseEntity] operator[<] identifier[Void] operator[>] identifier[deleteTarget] operator[SEP] annotation[@] identifier[PathVariable] operator[SEP] identifier[ENV_PATH_VAR_NAME] operator[SEP] identifier[String] identifier[env] , annotation[@] identifier[PathVariable] operator[SEP] identifier[SITE_NAME_PATH_VAR_NAME] operator[SEP] identifier[String] identifier[siteName] operator[SEP] Keyword[throws] identifier[DeployerException] {
identifier[targetService] operator[SEP] identifier[deleteTarget] operator[SEP] identifier[env] , identifier[siteName] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ResponseEntity] operator[<] operator[>] operator[SEP] identifier[HttpStatus] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP]
}
|
@Nonnull
public DataBuilder appendOperatingSystemPattern(@Nonnull final OperatingSystemPattern pattern) {
Check.notNull(pattern, "pattern");
if (!operatingSystemPatterns.containsKey(pattern.getId())) {
operatingSystemPatterns.put(pattern.getId(), new TreeSet<OperatingSystemPattern>(OS_PATTERN_COMPARATOR));
}
operatingSystemPatterns.get(pattern.getId()).add(pattern);
return this;
} | class class_name[name] begin[{]
method[appendOperatingSystemPattern, return_type[type[DataBuilder]], modifier[public], parameter[pattern]] begin[{]
call[Check.notNull, parameter[member[.pattern], literal["pattern"]]]
if[call[operatingSystemPatterns.containsKey, parameter[call[pattern.getId, parameter[]]]]] begin[{]
call[operatingSystemPatterns.put, parameter[call[pattern.getId, parameter[]], ClassCreator(arguments=[MemberReference(member=OS_PATTERN_COMPARATOR, 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=OperatingSystemPattern, sub_type=None))], dimensions=None, name=TreeSet, sub_type=None))]]
else begin[{]
None
end[}]
call[operatingSystemPatterns.get, parameter[call[pattern.getId, parameter[]]]]
return[THIS[]]
end[}]
END[}] | annotation[@] identifier[Nonnull] Keyword[public] identifier[DataBuilder] identifier[appendOperatingSystemPattern] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[OperatingSystemPattern] identifier[pattern] operator[SEP] {
identifier[Check] operator[SEP] identifier[notNull] operator[SEP] identifier[pattern] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[operatingSystemPatterns] operator[SEP] identifier[containsKey] operator[SEP] identifier[pattern] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[operatingSystemPatterns] operator[SEP] identifier[put] operator[SEP] identifier[pattern] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , Keyword[new] identifier[TreeSet] operator[<] identifier[OperatingSystemPattern] operator[>] operator[SEP] identifier[OS_PATTERN_COMPARATOR] operator[SEP] operator[SEP] operator[SEP]
}
identifier[operatingSystemPatterns] operator[SEP] identifier[get] operator[SEP] identifier[pattern] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[pattern] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP]
}
|
public Object addXToPoint(double x, Object point) {
((Point) point).setX(x);
return point;
} | class class_name[name] begin[{]
method[addXToPoint, return_type[type[Object]], modifier[public], parameter[x, point]] begin[{]
Cast(expression=MemberReference(member=point, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None))
return[member[.point]]
end[}]
END[}] | Keyword[public] identifier[Object] identifier[addXToPoint] operator[SEP] Keyword[double] identifier[x] , identifier[Object] identifier[point] operator[SEP] {
operator[SEP] operator[SEP] identifier[Point] operator[SEP] identifier[point] operator[SEP] operator[SEP] identifier[setX] operator[SEP] identifier[x] operator[SEP] operator[SEP] Keyword[return] identifier[point] operator[SEP]
}
|
private void initializeBigMapField(StorageEngine storageEngine, Field field) {
field.setAccessible(true);
try {
BigMap a = field.getAnnotation(BigMap.class);
field.set(this, storageEngine.getBigMap(field.getName(), a.keyClass(), a.valueClass(), a.mapType(), a.storageHint(), a.concurrent(), false));
}
catch (IllegalArgumentException | IllegalAccessException ex) {
throw new RuntimeException(ex);
}
} | class class_name[name] begin[{]
method[initializeBigMapField, return_type[void], modifier[private], parameter[storageEngine, field]] begin[{]
call[field.setAccessible, parameter[literal[true]]]
TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigMap, sub_type=None))], member=getAnnotation, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), name=a)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BigMap, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=keyClass, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=valueClass, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=mapType, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=storageHint, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=concurrent, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=getBigMap, postfix_operators=[], prefix_operators=[], qualifier=storageEngine, selectors=[], type_arguments=None)], member=set, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IllegalArgumentException', 'IllegalAccessException']))], finally_block=None, label=None, resources=None)
end[}]
END[}] | Keyword[private] Keyword[void] identifier[initializeBigMapField] operator[SEP] identifier[StorageEngine] identifier[storageEngine] , identifier[Field] identifier[field] operator[SEP] {
identifier[field] operator[SEP] identifier[setAccessible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[try] {
identifier[BigMap] identifier[a] operator[=] identifier[field] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[BigMap] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[set] operator[SEP] Keyword[this] , identifier[storageEngine] operator[SEP] identifier[getBigMap] operator[SEP] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[a] operator[SEP] identifier[keyClass] operator[SEP] operator[SEP] , identifier[a] operator[SEP] identifier[valueClass] operator[SEP] operator[SEP] , identifier[a] operator[SEP] identifier[mapType] operator[SEP] operator[SEP] , identifier[a] operator[SEP] identifier[storageHint] operator[SEP] operator[SEP] , identifier[a] operator[SEP] identifier[concurrent] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[IllegalArgumentException] operator[|] identifier[IllegalAccessException] identifier[ex] operator[SEP] {
Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[ex] operator[SEP] operator[SEP]
}
}
|
private void setUpDefaultUriComboBox(List<CmsSite> allSites) {
BeanItemContainer<CmsSite> objects = new BeanItemContainer<CmsSite>(CmsSite.class, allSites);
m_fieldDefaultURI.setContainerDataSource(objects);
m_fieldDefaultURI.setNullSelectionAllowed(false);
m_fieldDefaultURI.setTextInputAllowed(false);
m_fieldDefaultURI.setItemCaptionPropertyId("title");
//set value
String siteRoot = OpenCms.getSiteManager().getDefaultUri();
if (siteRoot.endsWith("/")) {
siteRoot = siteRoot.substring(0, siteRoot.length() - 1);
}
CmsSite site = OpenCms.getSiteManager().getSiteForSiteRoot(siteRoot);
m_fieldDefaultURI.setValue(site);
} | class class_name[name] begin[{]
method[setUpDefaultUriComboBox, return_type[void], modifier[private], parameter[allSites]] begin[{]
local_variable[type[BeanItemContainer], objects]
call[m_fieldDefaultURI.setContainerDataSource, parameter[member[.objects]]]
call[m_fieldDefaultURI.setNullSelectionAllowed, parameter[literal[false]]]
call[m_fieldDefaultURI.setTextInputAllowed, parameter[literal[false]]]
call[m_fieldDefaultURI.setItemCaptionPropertyId, parameter[literal["title"]]]
local_variable[type[String], siteRoot]
if[call[siteRoot.endsWith, parameter[literal["/"]]]] begin[{]
assign[member[.siteRoot], call[siteRoot.substring, parameter[literal[0], binary_operation[call[siteRoot.length, parameter[]], -, literal[1]]]]]
else begin[{]
None
end[}]
local_variable[type[CmsSite], site]
call[m_fieldDefaultURI.setValue, parameter[member[.site]]]
end[}]
END[}] | Keyword[private] Keyword[void] identifier[setUpDefaultUriComboBox] operator[SEP] identifier[List] operator[<] identifier[CmsSite] operator[>] identifier[allSites] operator[SEP] {
identifier[BeanItemContainer] operator[<] identifier[CmsSite] operator[>] identifier[objects] operator[=] Keyword[new] identifier[BeanItemContainer] operator[<] identifier[CmsSite] operator[>] operator[SEP] identifier[CmsSite] operator[SEP] Keyword[class] , identifier[allSites] operator[SEP] operator[SEP] identifier[m_fieldDefaultURI] operator[SEP] identifier[setContainerDataSource] operator[SEP] identifier[objects] operator[SEP] operator[SEP] identifier[m_fieldDefaultURI] operator[SEP] identifier[setNullSelectionAllowed] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[m_fieldDefaultURI] operator[SEP] identifier[setTextInputAllowed] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[m_fieldDefaultURI] operator[SEP] identifier[setItemCaptionPropertyId] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[siteRoot] operator[=] identifier[OpenCms] operator[SEP] identifier[getSiteManager] operator[SEP] operator[SEP] operator[SEP] identifier[getDefaultUri] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[siteRoot] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] {
identifier[siteRoot] operator[=] identifier[siteRoot] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[siteRoot] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP]
}
identifier[CmsSite] identifier[site] operator[=] identifier[OpenCms] operator[SEP] identifier[getSiteManager] operator[SEP] operator[SEP] operator[SEP] identifier[getSiteForSiteRoot] operator[SEP] identifier[siteRoot] operator[SEP] operator[SEP] identifier[m_fieldDefaultURI] operator[SEP] identifier[setValue] operator[SEP] identifier[site] operator[SEP] operator[SEP]
}
|
protected void addActionError( String propertyName, String messageKey, Object[] messageArgs )
{
InternalUtils.addActionError( propertyName, new ActionMessage( messageKey, messageArgs ), getRequest() );
} | class class_name[name] begin[{]
method[addActionError, return_type[void], modifier[protected], parameter[propertyName, messageKey, messageArgs]] begin[{]
call[InternalUtils.addActionError, parameter[member[.propertyName], ClassCreator(arguments=[MemberReference(member=messageKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=messageArgs, 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=ActionMessage, sub_type=None)), call[.getRequest, parameter[]]]]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[addActionError] operator[SEP] identifier[String] identifier[propertyName] , identifier[String] identifier[messageKey] , identifier[Object] operator[SEP] operator[SEP] identifier[messageArgs] operator[SEP] {
identifier[InternalUtils] operator[SEP] identifier[addActionError] operator[SEP] identifier[propertyName] , Keyword[new] identifier[ActionMessage] operator[SEP] identifier[messageKey] , identifier[messageArgs] operator[SEP] , identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
|
public final void sendObjectToSocket(Object o) {
Session sess = this.getSession();
if (sess != null) {
String json;
try {
json = this.mapper.writeValueAsString(o);
} catch (JsonProcessingException e) {
ClientSocketAdapter.LOGGER.error("Failed to serialize object", e);
return;
}
sess.getRemote().sendString(json, new WriteCallback() {
@Override
public void writeSuccess() {
ClientSocketAdapter.LOGGER.info("Send data to socket");
}
@Override
public void writeFailed(Throwable x) {
ClientSocketAdapter.LOGGER.error("Error sending message to socket", x);
}
});
}
} | class class_name[name] begin[{]
method[sendObjectToSocket, return_type[void], modifier[final public], parameter[o]] begin[{]
local_variable[type[Session], sess]
if[binary_operation[member[.sess], !=, literal[null]]] begin[{]
local_variable[type[String], json]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=json, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=mapper, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeValueAsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to serialize object"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=ClientSocketAdapter.LOGGER, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JsonProcessingException']))], finally_block=None, label=None, resources=None)
call[sess.getRemote, parameter[]]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[public] Keyword[final] Keyword[void] identifier[sendObjectToSocket] operator[SEP] identifier[Object] identifier[o] operator[SEP] {
identifier[Session] identifier[sess] operator[=] Keyword[this] operator[SEP] identifier[getSession] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sess] operator[!=] Other[null] operator[SEP] {
identifier[String] identifier[json] operator[SEP] Keyword[try] {
identifier[json] operator[=] Keyword[this] operator[SEP] identifier[mapper] operator[SEP] identifier[writeValueAsString] operator[SEP] identifier[o] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[JsonProcessingException] identifier[e] operator[SEP] {
identifier[ClientSocketAdapter] operator[SEP] identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[return] operator[SEP]
}
identifier[sess] operator[SEP] identifier[getRemote] operator[SEP] operator[SEP] operator[SEP] identifier[sendString] operator[SEP] identifier[json] , Keyword[new] identifier[WriteCallback] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[writeSuccess] operator[SEP] operator[SEP] {
identifier[ClientSocketAdapter] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP]
} annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[writeFailed] operator[SEP] identifier[Throwable] identifier[x] operator[SEP] {
identifier[ClientSocketAdapter] operator[SEP] identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[x] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP]
}
}
|
public Mirage getTileImage (String path, Rectangle bounds, Colorization[] zations)
{
return _imgr.getMirage(getImageKey(path), bounds, zations);
} | class class_name[name] begin[{]
method[getTileImage, return_type[type[Mirage]], modifier[public], parameter[path, bounds, zations]] begin[{]
return[call[_imgr.getMirage, parameter[call[.getImageKey, parameter[member[.path]]], member[.bounds], member[.zations]]]]
end[}]
END[}] | Keyword[public] identifier[Mirage] identifier[getTileImage] operator[SEP] identifier[String] identifier[path] , identifier[Rectangle] identifier[bounds] , identifier[Colorization] operator[SEP] operator[SEP] identifier[zations] operator[SEP] {
Keyword[return] identifier[_imgr] operator[SEP] identifier[getMirage] operator[SEP] identifier[getImageKey] operator[SEP] identifier[path] operator[SEP] , identifier[bounds] , identifier[zations] operator[SEP] operator[SEP]
}
|
public static boolean isCertPathBuilderException(Throwable cause) {
if (cause == null)
return false;
if (cause instanceof java.security.cert.CertPathBuilderException)
return true;
return isCertPathBuilderException(cause.getCause());
} | class class_name[name] begin[{]
method[isCertPathBuilderException, return_type[type[boolean]], modifier[public static], parameter[cause]] begin[{]
if[binary_operation[member[.cause], ==, literal[null]]] begin[{]
return[literal[false]]
else begin[{]
None
end[}]
if[binary_operation[member[.cause], instanceof, type[java]]] begin[{]
return[literal[true]]
else begin[{]
None
end[}]
return[call[.isCertPathBuilderException, parameter[call[cause.getCause, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[boolean] identifier[isCertPathBuilderException] operator[SEP] identifier[Throwable] identifier[cause] operator[SEP] {
Keyword[if] operator[SEP] identifier[cause] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[cause] Keyword[instanceof] identifier[java] operator[SEP] identifier[security] operator[SEP] identifier[cert] operator[SEP] identifier[CertPathBuilderException] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[return] identifier[isCertPathBuilderException] operator[SEP] identifier[cause] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
|
DocId getParent(int n, BitSet deleted) throws IOException
{
DocId parent;
boolean existing = false;
int parentDocNum = inSegmentParents[n];
if (parentDocNum != -1) {
parent = DocId.create(parentDocNum);
} else {
parent = foreignParentDocIds.get(n);
}
if (parent != null)
{
existing = true;
// check if valid and reset if necessary
if (!parent.isValid(deleted))
{
if (log.isDebugEnabled())
{
log.debug(parent + " not valid anymore.");
}
parent = null;
}
}
if (parent == null)
{
int plainDocId = -1;
Document doc = document(n, FieldSelectors.UUID_AND_PARENT);
String[] parentUUIDs = doc.getValues(FieldNames.PARENT);
if (parentUUIDs.length == 0 || parentUUIDs[0].length() == 0)
{
// root node
parent = DocId.NULL;
}
else
{
if (shareableNodes.get(n))
{
parent = DocId.create(parentUUIDs);
}
else
{
if (!existing)
{
Term id = new Term(FieldNames.UUID, parentUUIDs[0]);
TermDocs docs = termDocs(id);
try
{
while (docs.next())
{
if (!deleted.get(docs.doc()))
{
plainDocId = docs.doc();
parent = DocId.create(plainDocId);
break;
}
}
}
finally
{
docs.close();
}
}
// if still null, then parent is not in this index, or existing
// DocId was invalid. thus, only allowed to create DocId from uuid
if (parent == null)
{
parent = DocId.create(parentUUIDs[0]);
}
}
}
// finally put to cache
if (plainDocId != -1) {
// PlainDocId
inSegmentParents[n] = plainDocId;
} else {
// UUIDDocId
foreignParentDocIds.put(n, parent);
if (existing) {
// there was an existing parent reference in
// inSegmentParents, which was invalid and is replaced
// inSegmentParents, which was invalid and is replaced
// mark as unknown
inSegmentParents[n] = -1;
}
}
}
return parent;
} | class class_name[name] begin[{]
method[getParent, return_type[type[DocId]], modifier[default], parameter[n, deleted]] begin[{]
local_variable[type[DocId], parent]
local_variable[type[boolean], existing]
local_variable[type[int], parentDocNum]
if[binary_operation[member[.parentDocNum], !=, literal[1]]] begin[{]
assign[member[.parent], call[DocId.create, parameter[member[.parentDocNum]]]]
else begin[{]
assign[member[.parent], call[foreignParentDocIds.get, parameter[member[.n]]]]
end[}]
if[binary_operation[member[.parent], !=, literal[null]]] begin[{]
assign[member[.existing], literal[true]]
if[call[parent.isValid, parameter[member[.deleted]]]] begin[{]
if[call[log.isDebugEnabled, parameter[]]] begin[{]
call[log.debug, parameter[binary_operation[member[.parent], +, literal[" not valid anymore."]]]]
else begin[{]
None
end[}]
assign[member[.parent], literal[null]]
else begin[{]
None
end[}]
else begin[{]
None
end[}]
if[binary_operation[member[.parent], ==, literal[null]]] begin[{]
local_variable[type[int], plainDocId]
local_variable[type[Document], doc]
local_variable[type[String], parentUUIDs]
if[binary_operation[binary_operation[member[parentUUIDs.length], ==, literal[0]], ||, binary_operation[member[.parentUUIDs], ==, literal[0]]]] begin[{]
assign[member[.parent], member[DocId.NULL]]
else begin[{]
if[call[shareableNodes.get, parameter[member[.n]]]] begin[{]
assign[member[.parent], call[DocId.create, parameter[member[.parentUUIDs]]]]
else begin[{]
if[member[.existing]] begin[{]
local_variable[type[Term], id]
local_variable[type[TermDocs], docs]
TryStatement(block=[WhileStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=doc, postfix_operators=[], prefix_operators=[], qualifier=docs, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=['!'], qualifier=deleted, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=plainDocId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=doc, postfix_operators=[], prefix_operators=[], qualifier=docs, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=plainDocId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=create, postfix_operators=[], prefix_operators=[], qualifier=DocId, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]))]), condition=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=docs, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=docs, selectors=[], type_arguments=None), label=None)], label=None, resources=None)
else begin[{]
None
end[}]
if[binary_operation[member[.parent], ==, literal[null]]] begin[{]
assign[member[.parent], call[DocId.create, parameter[member[.parentUUIDs]]]]
else begin[{]
None
end[}]
end[}]
end[}]
if[binary_operation[member[.plainDocId], !=, literal[1]]] begin[{]
assign[member[.inSegmentParents], member[.plainDocId]]
else begin[{]
call[foreignParentDocIds.put, parameter[member[.n], member[.parent]]]
if[member[.existing]] begin[{]
assign[member[.inSegmentParents], literal[1]]
else begin[{]
None
end[}]
end[}]
else begin[{]
None
end[}]
return[member[.parent]]
end[}]
END[}] | identifier[DocId] identifier[getParent] operator[SEP] Keyword[int] identifier[n] , identifier[BitSet] identifier[deleted] operator[SEP] Keyword[throws] identifier[IOException] {
identifier[DocId] identifier[parent] operator[SEP] Keyword[boolean] identifier[existing] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[parentDocNum] operator[=] identifier[inSegmentParents] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parentDocNum] operator[!=] operator[-] Other[1] operator[SEP] {
identifier[parent] operator[=] identifier[DocId] operator[SEP] identifier[create] operator[SEP] identifier[parentDocNum] operator[SEP] operator[SEP]
}
Keyword[else] {
identifier[parent] operator[=] identifier[foreignParentDocIds] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP]
}
Keyword[if] operator[SEP] identifier[parent] operator[!=] Other[null] operator[SEP] {
identifier[existing] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[parent] operator[SEP] identifier[isValid] operator[SEP] identifier[deleted] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] {
identifier[log] operator[SEP] identifier[debug] operator[SEP] identifier[parent] operator[+] literal[String] operator[SEP] operator[SEP]
}
identifier[parent] operator[=] Other[null] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[parent] operator[==] Other[null] operator[SEP] {
Keyword[int] identifier[plainDocId] operator[=] operator[-] Other[1] operator[SEP] identifier[Document] identifier[doc] operator[=] identifier[document] operator[SEP] identifier[n] , identifier[FieldSelectors] operator[SEP] identifier[UUID_AND_PARENT] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[parentUUIDs] operator[=] identifier[doc] operator[SEP] identifier[getValues] operator[SEP] identifier[FieldNames] operator[SEP] identifier[PARENT] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parentUUIDs] operator[SEP] identifier[length] operator[==] Other[0] operator[||] identifier[parentUUIDs] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] {
identifier[parent] operator[=] identifier[DocId] operator[SEP] identifier[NULL] operator[SEP]
}
Keyword[else] {
Keyword[if] operator[SEP] identifier[shareableNodes] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] {
identifier[parent] operator[=] identifier[DocId] operator[SEP] identifier[create] operator[SEP] identifier[parentUUIDs] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[if] operator[SEP] operator[!] identifier[existing] operator[SEP] {
identifier[Term] identifier[id] operator[=] Keyword[new] identifier[Term] operator[SEP] identifier[FieldNames] operator[SEP] identifier[UUID] , identifier[parentUUIDs] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[TermDocs] identifier[docs] operator[=] identifier[termDocs] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[try] {
Keyword[while] operator[SEP] identifier[docs] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] operator[!] identifier[deleted] operator[SEP] identifier[get] operator[SEP] identifier[docs] operator[SEP] identifier[doc] operator[SEP] operator[SEP] operator[SEP] operator[SEP] {
identifier[plainDocId] operator[=] identifier[docs] operator[SEP] identifier[doc] operator[SEP] operator[SEP] operator[SEP] identifier[parent] operator[=] identifier[DocId] operator[SEP] identifier[create] operator[SEP] identifier[plainDocId] operator[SEP] operator[SEP] Keyword[break] operator[SEP]
}
}
}
Keyword[finally] {
identifier[docs] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP]
}
}
Keyword[if] operator[SEP] identifier[parent] operator[==] Other[null] operator[SEP] {
identifier[parent] operator[=] identifier[DocId] operator[SEP] identifier[create] operator[SEP] identifier[parentUUIDs] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP]
}
}
}
Keyword[if] operator[SEP] identifier[plainDocId] operator[!=] operator[-] Other[1] operator[SEP] {
identifier[inSegmentParents] operator[SEP] identifier[n] operator[SEP] operator[=] identifier[plainDocId] operator[SEP]
}
Keyword[else] {
identifier[foreignParentDocIds] operator[SEP] identifier[put] operator[SEP] identifier[n] , identifier[parent] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[existing] operator[SEP] {
identifier[inSegmentParents] operator[SEP] identifier[n] operator[SEP] operator[=] operator[-] Other[1] operator[SEP]
}
}
}
Keyword[return] identifier[parent] operator[SEP]
}
|
public String getFlexCacheKeyDump() {
if (m_flexCache != null) {
StringBuffer buffer = new StringBuffer();
m_flexCache.dumpKeys(buffer);
return buffer.toString();
} else {
return null;
}
} | class class_name[name] begin[{]
method[getFlexCacheKeyDump, return_type[type[String]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.m_flexCache], !=, literal[null]]] begin[{]
local_variable[type[StringBuffer], buffer]
call[m_flexCache.dumpKeys, parameter[member[.buffer]]]
return[call[buffer.toString, parameter[]]]
else begin[{]
return[literal[null]]
end[}]
end[}]
END[}] | Keyword[public] identifier[String] identifier[getFlexCacheKeyDump] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[m_flexCache] operator[!=] Other[null] operator[SEP] {
identifier[StringBuffer] identifier[buffer] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[m_flexCache] operator[SEP] identifier[dumpKeys] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] Keyword[return] identifier[buffer] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[return] Other[null] operator[SEP]
}
}
|
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case TypesPackage.JVM_ANNOTATION_REFERENCE__ANNOTATION:
return annotation != null;
case TypesPackage.JVM_ANNOTATION_REFERENCE__EXPLICIT_VALUES:
return explicitValues != null && !explicitValues.isEmpty();
}
return super.eIsSet(featureID);
} | class class_name[name] begin[{]
method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=JVM_ANNOTATION_REFERENCE__ANNOTATION, postfix_operators=[], prefix_operators=[], qualifier=TypesPackage, selectors=[])], statements=[ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=annotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)]), SwitchStatementCase(case=[MemberReference(member=JVM_ANNOTATION_REFERENCE__EXPLICIT_VALUES, postfix_operators=[], prefix_operators=[], qualifier=TypesPackage, selectors=[])], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=explicitValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=explicitValues, selectors=[], type_arguments=None), operator=&&), label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)
return[SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eIsSet, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] {
Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] {
Keyword[case] identifier[TypesPackage] operator[SEP] identifier[JVM_ANNOTATION_REFERENCE__ANNOTATION] operator[:] Keyword[return] identifier[annotation] operator[!=] Other[null] operator[SEP] Keyword[case] identifier[TypesPackage] operator[SEP] identifier[JVM_ANNOTATION_REFERENCE__EXPLICIT_VALUES] operator[:] Keyword[return] identifier[explicitValues] operator[!=] Other[null] operator[&&] operator[!] identifier[explicitValues] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] Keyword[super] operator[SEP] identifier[eIsSet] operator[SEP] identifier[featureID] operator[SEP] operator[SEP]
}
|
public static List<CommerceTierPriceEntry> findByGroupId(long groupId,
int start, int end) {
return getPersistence().findByGroupId(groupId, start, end);
} | class class_name[name] begin[{]
method[findByGroupId, return_type[type[List]], modifier[public static], parameter[groupId, start, end]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CommerceTierPriceEntry] operator[>] identifier[findByGroupId] operator[SEP] Keyword[long] identifier[groupId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] {
Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[findByGroupId] operator[SEP] identifier[groupId] , identifier[start] , identifier[end] operator[SEP] operator[SEP]
}
|
public int bitrate(int i){
if(i>=links)
return (-1);
if(!seekable&&i!=0)
return (bitrate(0));
if(i<0){
long bits=0;
for(int j=0; j<links; j++){
bits+=(offsets[j+1]-dataoffsets[j])*8;
}
return ((int)Math.rint(bits/time_total(-1)));
}
else{
if(seekable){
// return the actual bitrate
return ((int)Math.rint((offsets[i+1]-dataoffsets[i])*8/time_total(i)));
}
else{
// return nominal if set
if(vi[i].bitrate_nominal>0){
return vi[i].bitrate_nominal;
}
else{
if(vi[i].bitrate_upper>0){
if(vi[i].bitrate_lower>0){
return (vi[i].bitrate_upper+vi[i].bitrate_lower)/2;
}
else{
return vi[i].bitrate_upper;
}
}
return (-1);
}
}
}
} | class class_name[name] begin[{]
method[bitrate, return_type[type[int]], modifier[public], parameter[i]] begin[{]
if[binary_operation[member[.i], >=, member[.links]]] begin[{]
return[literal[1]]
else begin[{]
None
end[}]
if[binary_operation[member[.seekable], &&, binary_operation[member[.i], !=, literal[0]]]] begin[{]
return[call[.bitrate, parameter[literal[0]]]]
else begin[{]
None
end[}]
if[binary_operation[member[.i], <, literal[0]]] begin[{]
local_variable[type[long], bits]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=offsets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operandr=MemberReference(member=dataoffsets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=links, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
return[Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=bits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], member=time_total, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=/)], member=rint, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))]
else begin[{]
if[member[.seekable]] begin[{]
return[Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=offsets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operandr=MemberReference(member=dataoffsets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=*), operandr=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=time_total, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=/)], member=rint, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))]
else begin[{]
if[binary_operation[member[.vi], >, literal[0]]] begin[{]
return[member[.vi]]
else begin[{]
if[binary_operation[member[.vi], >, literal[0]]] begin[{]
if[binary_operation[member[.vi], >, literal[0]]] begin[{]
return[binary_operation[binary_operation[member[.vi], +, member[.vi]], /, literal[2]]]
else begin[{]
return[member[.vi]]
end[}]
else begin[{]
None
end[}]
return[literal[1]]
end[}]
end[}]
end[}]
end[}]
END[}] | Keyword[public] Keyword[int] identifier[bitrate] operator[SEP] Keyword[int] identifier[i] operator[SEP] {
Keyword[if] operator[SEP] identifier[i] operator[>=] identifier[links] operator[SEP] Keyword[return] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[seekable] operator[&&] identifier[i] operator[!=] Other[0] operator[SEP] Keyword[return] operator[SEP] identifier[bitrate] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[<] Other[0] operator[SEP] {
Keyword[long] identifier[bits] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[links] operator[SEP] identifier[j] operator[++] operator[SEP] {
identifier[bits] operator[+=] operator[SEP] identifier[offsets] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[-] identifier[dataoffsets] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[*] Other[8] operator[SEP]
}
Keyword[return] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[rint] operator[SEP] identifier[bits] operator[/] identifier[time_total] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[if] operator[SEP] identifier[seekable] operator[SEP] {
Keyword[return] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[rint] operator[SEP] operator[SEP] identifier[offsets] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[-] identifier[dataoffsets] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[*] Other[8] operator[/] identifier[time_total] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[if] operator[SEP] identifier[vi] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[bitrate_nominal] operator[>] Other[0] operator[SEP] {
Keyword[return] identifier[vi] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[bitrate_nominal] operator[SEP]
}
Keyword[else] {
Keyword[if] operator[SEP] identifier[vi] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[bitrate_upper] operator[>] Other[0] operator[SEP] {
Keyword[if] operator[SEP] identifier[vi] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[bitrate_lower] operator[>] Other[0] operator[SEP] {
Keyword[return] operator[SEP] identifier[vi] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[bitrate_upper] operator[+] identifier[vi] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[bitrate_lower] operator[SEP] operator[/] Other[2] operator[SEP]
}
Keyword[else] {
Keyword[return] identifier[vi] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[bitrate_upper] operator[SEP]
}
}
Keyword[return] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP]
}
}
}
}
|
public void consolidateMultiplePaths() {
Map<String, Set<ResourceMethod>> oldResources = resources;
resources = new HashMap<>();
oldResources.keySet().forEach(s -> consolidateMultipleMethodsForSamePath(s, oldResources.get(s)));
} | class class_name[name] begin[{]
method[consolidateMultiplePaths, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[Map], oldResources]
assign[member[.resources], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=HashMap, sub_type=None))]
call[oldResources.keySet, parameter[]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[consolidateMultiplePaths] operator[SEP] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[Set] operator[<] identifier[ResourceMethod] operator[>] operator[>] identifier[oldResources] operator[=] identifier[resources] operator[SEP] identifier[resources] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[oldResources] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identifier[s] operator[->] identifier[consolidateMultipleMethodsForSamePath] operator[SEP] identifier[s] , identifier[oldResources] operator[SEP] identifier[get] operator[SEP] identifier[s] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
|
public static IAtomContainerSet getAllReactants(IReaction reaction) {
IAtomContainerSet moleculeSet = reaction.getBuilder().newInstance(IAtomContainerSet.class);
IAtomContainerSet reactants = reaction.getReactants();
for (int i = 0; i < reactants.getAtomContainerCount(); i++) {
moleculeSet.addAtomContainer(reactants.getAtomContainer(i));
}
return moleculeSet;
} | class class_name[name] begin[{]
method[getAllReactants, return_type[type[IAtomContainerSet]], modifier[public static], parameter[reaction]] begin[{]
local_variable[type[IAtomContainerSet], moleculeSet]
local_variable[type[IAtomContainerSet], reactants]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAtomContainer, postfix_operators=[], prefix_operators=[], qualifier=reactants, selectors=[], type_arguments=None)], member=addAtomContainer, postfix_operators=[], prefix_operators=[], qualifier=moleculeSet, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getAtomContainerCount, postfix_operators=[], prefix_operators=[], qualifier=reactants, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)
return[member[.moleculeSet]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[IAtomContainerSet] identifier[getAllReactants] operator[SEP] identifier[IReaction] identifier[reaction] operator[SEP] {
identifier[IAtomContainerSet] identifier[moleculeSet] operator[=] identifier[reaction] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] identifier[IAtomContainerSet] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[IAtomContainerSet] identifier[reactants] operator[=] identifier[reaction] operator[SEP] identifier[getReactants] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[reactants] operator[SEP] identifier[getAtomContainerCount] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] {
identifier[moleculeSet] operator[SEP] identifier[addAtomContainer] operator[SEP] identifier[reactants] operator[SEP] identifier[getAtomContainer] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[return] identifier[moleculeSet] operator[SEP]
}
|
public @NotNull Class<?> get() {
String namespace = declaringClass.getName();
String expectedInnerClassName = expectedInnerClassName(namespace);
for (Class<?> innerClass : declaringClass.getDeclaredClasses()) {
if (innerClass.getName().equals(expectedInnerClassName)) {
return innerClass;
}
}
String format = "Failed to find static inner class %s in %s";
throw new ReflectionError(String.format(format, innerClassName, declaringClass.getName()));
} | class class_name[name] begin[{]
method[get, return_type[type[Class]], modifier[public], parameter[]] begin[{]
local_variable[type[String], namespace]
local_variable[type[String], expectedInnerClassName]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=innerClass, selectors=[MethodInvocation(arguments=[MemberReference(member=expectedInnerClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=innerClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDeclaredClasses, postfix_operators=[], prefix_operators=[], qualifier=declaringClass, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=innerClass)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))), label=None)
local_variable[type[String], format]
ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=innerClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=declaringClass, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ReflectionError, sub_type=None)), label=None)
end[}]
END[}] | Keyword[public] annotation[@] identifier[NotNull] identifier[Class] operator[<] operator[?] operator[>] identifier[get] operator[SEP] operator[SEP] {
identifier[String] identifier[namespace] operator[=] identifier[declaringClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[expectedInnerClassName] operator[=] identifier[expectedInnerClassName] operator[SEP] identifier[namespace] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[innerClass] operator[:] identifier[declaringClass] operator[SEP] identifier[getDeclaredClasses] operator[SEP] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[innerClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[expectedInnerClassName] operator[SEP] operator[SEP] {
Keyword[return] identifier[innerClass] operator[SEP]
}
}
identifier[String] identifier[format] operator[=] literal[String] operator[SEP] Keyword[throw] Keyword[new] identifier[ReflectionError] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[format] , identifier[innerClassName] , identifier[declaringClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
|
@Override
public void close()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
Tr.debug(tc, "em.close();\n" + toString());
// JPA 5.9.1 Container Responsibilities
// The container must throw the IllegalStateException if the application calls
// EntityManager.close on a container-managed entity manager.
throw new IllegalStateException("Can not close EntityManager session in container-managed entity manager (JPA 5.9.1).");
} | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{]
call[Tr.debug, parameter[member[.tc], binary_operation[literal["em.close();\n"], +, call[.toString, parameter[]]]]]
else begin[{]
None
end[}]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can not close EntityManager session in container-managed entity manager (JPA 5.9.1).")], 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[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] 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[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
|
protected CommsServerByteBuffer getCommsServerByteBuffer() {
if (tc.isEntryEnabled())
SibTr.entry(tc, "getCommsServerByteBuffer");
CommsServerByteBuffer buff = commsByteBufferPool.allocate();
if (tc.isEntryEnabled())
SibTr.entry(tc, "getCommsServerByteBuffer", buff);
return buff;
} | class class_name[name] begin[{]
method[getCommsServerByteBuffer, return_type[type[CommsServerByteBuffer]], modifier[protected], parameter[]] begin[{]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[SibTr.entry, parameter[member[.tc], literal["getCommsServerByteBuffer"]]]
else begin[{]
None
end[}]
local_variable[type[CommsServerByteBuffer], buff]
if[call[tc.isEntryEnabled, parameter[]]] begin[{]
call[SibTr.entry, parameter[member[.tc], literal["getCommsServerByteBuffer"], member[.buff]]]
else begin[{]
None
end[}]
return[member[.buff]]
end[}]
END[}] | Keyword[protected] identifier[CommsServerByteBuffer] identifier[getCommsServerByteBuffer] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[CommsServerByteBuffer] identifier[buff] operator[=] identifier[commsByteBufferPool] operator[SEP] identifier[allocate] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , identifier[buff] operator[SEP] operator[SEP] Keyword[return] identifier[buff] operator[SEP]
}
|
@Override
public void setProperty(final Object bean, final String name, final Object value) {
BeanProperty beanProperty = new BeanProperty(this, bean, name);
if (!isSilent) {
resolveNestedProperties(beanProperty);
setIndexProperty(beanProperty, value);
}
else {
try {
resolveNestedProperties(beanProperty);
setIndexProperty(beanProperty, value);
}
catch (Exception ignore) {}
}
} | class class_name[name] begin[{]
method[setProperty, return_type[void], modifier[public], parameter[bean, name, value]] begin[{]
local_variable[type[BeanProperty], beanProperty]
if[member[.isSilent]] begin[{]
call[.resolveNestedProperties, parameter[member[.beanProperty]]]
call[.setIndexProperty, parameter[member[.beanProperty], member[.value]]]
else begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=beanProperty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveNestedProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=beanProperty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setIndexProperty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignore, types=['Exception']))], finally_block=None, label=None, resources=None)
end[}]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setProperty] operator[SEP] Keyword[final] identifier[Object] identifier[bean] , Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[Object] identifier[value] operator[SEP] {
identifier[BeanProperty] identifier[beanProperty] operator[=] Keyword[new] identifier[BeanProperty] operator[SEP] Keyword[this] , identifier[bean] , identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isSilent] operator[SEP] {
identifier[resolveNestedProperties] operator[SEP] identifier[beanProperty] operator[SEP] operator[SEP] identifier[setIndexProperty] operator[SEP] identifier[beanProperty] , identifier[value] operator[SEP] operator[SEP]
}
Keyword[else] {
Keyword[try] {
identifier[resolveNestedProperties] operator[SEP] identifier[beanProperty] operator[SEP] operator[SEP] identifier[setIndexProperty] operator[SEP] identifier[beanProperty] , identifier[value] operator[SEP] operator[SEP]
}
Keyword[catch] operator[SEP] identifier[Exception] identifier[ignore] operator[SEP] {
}
}
}
|
public GroovyExpression generateArithmeticExpression(GroovyExpression left, String operator,
GroovyExpression right) throws AtlasException {
ArithmeticOperator op = ArithmeticOperator.lookup(operator);
return new ArithmeticExpression(left, op, right);
} | class class_name[name] begin[{]
method[generateArithmeticExpression, return_type[type[GroovyExpression]], modifier[public], parameter[left, operator, right]] begin[{]
local_variable[type[ArithmeticOperator], op]
return[ClassCreator(arguments=[MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=right, 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=ArithmeticExpression, sub_type=None))]
end[}]
END[}] | Keyword[public] identifier[GroovyExpression] identifier[generateArithmeticExpression] operator[SEP] identifier[GroovyExpression] identifier[left] , identifier[String] identifier[operator] , identifier[GroovyExpression] identifier[right] operator[SEP] Keyword[throws] identifier[AtlasException] {
identifier[ArithmeticOperator] identifier[op] operator[=] identifier[ArithmeticOperator] operator[SEP] identifier[lookup] operator[SEP] identifier[operator] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ArithmeticExpression] operator[SEP] identifier[left] , identifier[op] , identifier[right] operator[SEP] operator[SEP]
}
|
public Observable<Page<VirtualNetworkRuleInner>> listByServerAsync(final String resourceGroupName, final String serverName) {
return listByServerWithServiceResponseAsync(resourceGroupName, serverName)
.map(new Func1<ServiceResponse<Page<VirtualNetworkRuleInner>>, Page<VirtualNetworkRuleInner>>() {
@Override
public Page<VirtualNetworkRuleInner> call(ServiceResponse<Page<VirtualNetworkRuleInner>> response) {
return response.body();
}
});
} | class class_name[name] begin[{]
method[listByServerAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, serverName]] begin[{]
return[call[.listByServerWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.serverName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[VirtualNetworkRuleInner] operator[>] operator[>] identifier[listByServerAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[serverName] operator[SEP] {
Keyword[return] identifier[listByServerWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[serverName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[VirtualNetworkRuleInner] operator[>] operator[>] , identifier[Page] operator[<] identifier[VirtualNetworkRuleInner] operator[>] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] identifier[Page] operator[<] identifier[VirtualNetworkRuleInner] operator[>] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[VirtualNetworkRuleInner] operator[>] operator[>] identifier[response] operator[SEP] {
Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP]
}
|
protected void postProcessing() {
if (argOptions.hasOption("saveIndexes")) {
String filename = argOptions.getStringOption("saveIndexes");
SerializableUtil.save(dri.getWordToVectorMap(),
new File(filename + ".index"));
SerializableUtil.save(dri.getPermutations(),
new File(filename + ".permutation"));
}
} | class class_name[name] begin[{]
method[postProcessing, return_type[void], modifier[protected], parameter[]] begin[{]
if[call[argOptions.hasOption, parameter[literal["saveIndexes"]]]] begin[{]
local_variable[type[String], filename]
call[SerializableUtil.save, parameter[call[dri.getWordToVectorMap, parameter[]], ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=filename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".index"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))]]
call[SerializableUtil.save, parameter[call[dri.getPermutations, parameter[]], ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=filename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".permutation"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))]]
else begin[{]
None
end[}]
end[}]
END[}] | Keyword[protected] Keyword[void] identifier[postProcessing] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[argOptions] operator[SEP] identifier[hasOption] operator[SEP] literal[String] operator[SEP] operator[SEP] {
identifier[String] identifier[filename] operator[=] identifier[argOptions] operator[SEP] identifier[getStringOption] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[SerializableUtil] operator[SEP] identifier[save] operator[SEP] identifier[dri] operator[SEP] identifier[getWordToVectorMap] operator[SEP] operator[SEP] , Keyword[new] identifier[File] operator[SEP] identifier[filename] operator[+] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[SerializableUtil] operator[SEP] identifier[save] operator[SEP] identifier[dri] operator[SEP] identifier[getPermutations] operator[SEP] operator[SEP] , Keyword[new] identifier[File] operator[SEP] identifier[filename] operator[+] literal[String] operator[SEP] operator[SEP] operator[SEP]
}
}
|
public void paintArc(final Rectangle2D pRectangle, int pStartAngle, int pArcAngle) {
paintShape(toArc(pRectangle, pStartAngle, pArcAngle, true));
} | class class_name[name] begin[{]
method[paintArc, return_type[void], modifier[public], parameter[pRectangle, pStartAngle, pArcAngle]] begin[{]
call[.paintShape, parameter[call[.toArc, parameter[member[.pRectangle], member[.pStartAngle], member[.pArcAngle], literal[true]]]]]
end[}]
END[}] | Keyword[public] Keyword[void] identifier[paintArc] operator[SEP] Keyword[final] identifier[Rectangle2D] identifier[pRectangle] , Keyword[int] identifier[pStartAngle] , Keyword[int] identifier[pArcAngle] operator[SEP] {
identifier[paintShape] operator[SEP] identifier[toArc] operator[SEP] identifier[pRectangle] , identifier[pStartAngle] , identifier[pArcAngle] , literal[boolean] operator[SEP] operator[SEP] operator[SEP]
}
|
public Double zincrby(Object key, double score, Object member) {
Jedis jedis = getJedis();
try {
return jedis.zincrby(keyToBytes(key), score, valueToBytes(member));
}
finally {close(jedis);}
} | class class_name[name] begin[{]
method[zincrby, return_type[type[Double]], modifier[public], parameter[key, score, member]] begin[{]
local_variable[type[Jedis], jedis]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=keyToBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=score, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=member, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueToBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=zincrby, postfix_operators=[], prefix_operators=[], qualifier=jedis, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jedis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=close, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None)
end[}]
END[}] | Keyword[public] identifier[Double] identifier[zincrby] operator[SEP] identifier[Object] identifier[key] , Keyword[double] identifier[score] , identifier[Object] identifier[member] operator[SEP] {
identifier[Jedis] identifier[jedis] operator[=] identifier[getJedis] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[return] identifier[jedis] operator[SEP] identifier[zincrby] operator[SEP] identifier[keyToBytes] operator[SEP] identifier[key] operator[SEP] , identifier[score] , identifier[valueToBytes] operator[SEP] identifier[member] operator[SEP] operator[SEP] operator[SEP]
}
Keyword[finally] {
identifier[close] operator[SEP] identifier[jedis] operator[SEP] operator[SEP]
}
}
|
@Override
public JsonError resolveError(Throwable t, Method method, List<JsonNode> arguments) {
JsonError resolvedError;
for (ErrorResolver resolver : resolvers) {
resolvedError = resolver.resolveError(t, method, arguments);
if (resolvedError != null) {
return resolvedError;
}
}
return null;
} | class class_name[name] begin[{]
method[resolveError, return_type[type[JsonError]], modifier[public], parameter[t, method, arguments]] begin[{]
local_variable[type[JsonError], resolvedError]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=resolvedError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=arguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveError, postfix_operators=[], prefix_operators=[], qualifier=resolver, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=resolvedError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=resolvedError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=resolvers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=resolver)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ErrorResolver, sub_type=None))), label=None)
return[literal[null]]
end[}]
END[}] | annotation[@] identifier[Override] Keyword[public] identifier[JsonError] identifier[resolveError] operator[SEP] identifier[Throwable] identifier[t] , identifier[Method] identifier[method] , identifier[List] operator[<] identifier[JsonNode] operator[>] identifier[arguments] operator[SEP] {
identifier[JsonError] identifier[resolvedError] operator[SEP] Keyword[for] operator[SEP] identifier[ErrorResolver] identifier[resolver] operator[:] identifier[resolvers] operator[SEP] {
identifier[resolvedError] operator[=] identifier[resolver] operator[SEP] identifier[resolveError] operator[SEP] identifier[t] , identifier[method] , identifier[arguments] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resolvedError] operator[!=] Other[null] operator[SEP] {
Keyword[return] identifier[resolvedError] operator[SEP]
}
}
Keyword[return] Other[null] operator[SEP]
}
|
public Observable<ExpressRouteLinkInner> getAsync(String resourceGroupName, String expressRoutePortName, String linkName) {
return getWithServiceResponseAsync(resourceGroupName, expressRoutePortName, linkName).map(new Func1<ServiceResponse<ExpressRouteLinkInner>, ExpressRouteLinkInner>() {
@Override
public ExpressRouteLinkInner call(ServiceResponse<ExpressRouteLinkInner> response) {
return response.body();
}
});
} | class class_name[name] begin[{]
method[getAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, expressRoutePortName, linkName]] begin[{]
return[call[.getWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.expressRoutePortName], member[.linkName]]]]
end[}]
END[}] | Keyword[public] identifier[Observable] operator[<] identifier[ExpressRouteLinkInner] operator[>] identifier[getAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[expressRoutePortName] , identifier[String] identifier[linkName] operator[SEP] {
Keyword[return] identifier[getWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[expressRoutePortName] , identifier[linkName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[ExpressRouteLinkInner] operator[>] , identifier[ExpressRouteLinkInner] operator[>] operator[SEP] operator[SEP] {
annotation[@] identifier[Override] Keyword[public] identifier[ExpressRouteLinkInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[ExpressRouteLinkInner] operator[>] identifier[response] operator[SEP] {
Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP]
}
} operator[SEP] operator[SEP]
}
|
@Deprecated
public void addResolveInfoForIntentNoDefaults(Intent intent, ResolveInfo info) {
Preconditions.checkNotNull(info);
List<ResolveInfo> infoList = resolveInfoForIntent.get(intent);
if (infoList == null) {
infoList = new ArrayList<>();
resolveInfoForIntent.put(intent, infoList);
}
infoList.add(info);
} | class class_name[name] begin[{]
method[addResolveInfoForIntentNoDefaults, return_type[void], modifier[public], parameter[intent, info]] begin[{]
call[Preconditions.checkNotNull, parameter[member[.info]]]
local_variable[type[List], infoList]
if[binary_operation[member[.infoList], ==, literal[null]]] begin[{]
assign[member[.infoList], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))]
call[resolveInfoForIntent.put, parameter[member[.intent], member[.infoList]]]
else begin[{]
None
end[}]
call[infoList.add, parameter[member[.info]]]
end[}]
END[}] | annotation[@] identifier[Deprecated] Keyword[public] Keyword[void] identifier[addResolveInfoForIntentNoDefaults] operator[SEP] identifier[Intent] identifier[intent] , identifier[ResolveInfo] identifier[info] operator[SEP] {
identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[info] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[ResolveInfo] operator[>] identifier[infoList] operator[=] identifier[resolveInfoForIntent] operator[SEP] identifier[get] operator[SEP] identifier[intent] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[infoList] operator[==] Other[null] operator[SEP] {
identifier[infoList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[resolveInfoForIntent] operator[SEP] identifier[put] operator[SEP] identifier[intent] , identifier[infoList] operator[SEP] operator[SEP]
}
identifier[infoList] operator[SEP] identifier[add] operator[SEP] identifier[info] operator[SEP] operator[SEP]
}
|
public List<String> findAllInContent(String content) {
List<String> results = new LinkedList<String>();
// First check for all simple exact occurrences
for (BoyerMooreMatcher matcher : strings) {
if (matcher.findInContent(content) >= 0)
results.add(matcher.getPattern());
}
// Then check for all regex occurrences
Matcher matcher;
for (Pattern pattern : patterns) {
matcher = pattern.matcher(content);
if (matcher.find()) {
results.add(content);
}
}
return results;
} | class class_name[name] begin[{]
method[findAllInContent, return_type[type[List]], modifier[public], parameter[content]] begin[{]
local_variable[type[List], results]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findInContent, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getPattern, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=strings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=matcher)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BoyerMooreMatcher, sub_type=None))), label=None)
local_variable[type[Matcher], matcher]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=matcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=pattern, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=find, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=patterns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pattern)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Pattern, sub_type=None))), label=None)
return[member[.results]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[findAllInContent] operator[SEP] identifier[String] identifier[content] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[results] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[BoyerMooreMatcher] identifier[matcher] operator[:] identifier[strings] operator[SEP] {
Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[findInContent] operator[SEP] identifier[content] operator[SEP] operator[>=] Other[0] operator[SEP] identifier[results] operator[SEP] identifier[add] operator[SEP] identifier[matcher] operator[SEP] identifier[getPattern] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
identifier[Matcher] identifier[matcher] operator[SEP] Keyword[for] operator[SEP] identifier[Pattern] identifier[pattern] operator[:] identifier[patterns] operator[SEP] {
identifier[matcher] operator[=] identifier[pattern] operator[SEP] identifier[matcher] operator[SEP] identifier[content] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] {
identifier[results] operator[SEP] identifier[add] operator[SEP] identifier[content] operator[SEP] operator[SEP]
}
}
Keyword[return] identifier[results] operator[SEP]
}
|
public CFMetaData getCFMetaData(UUID cfId)
{
Pair<String,String> cf = getCF(cfId);
return (cf == null) ? null : getCFMetaData(cf.left, cf.right);
} | class class_name[name] begin[{]
method[getCFMetaData, return_type[type[CFMetaData]], modifier[public], parameter[cfId]] begin[{]
local_variable[type[Pair], cf]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=cf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=cf, selectors=[]), MemberReference(member=right, postfix_operators=[], prefix_operators=[], qualifier=cf, selectors=[])], member=getCFMetaData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))]
end[}]
END[}] | Keyword[public] identifier[CFMetaData] identifier[getCFMetaData] operator[SEP] identifier[UUID] identifier[cfId] operator[SEP] {
identifier[Pair] operator[<] identifier[String] , identifier[String] operator[>] identifier[cf] operator[=] identifier[getCF] operator[SEP] identifier[cfId] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[cf] operator[==] Other[null] operator[SEP] operator[?] Other[null] operator[:] identifier[getCFMetaData] operator[SEP] identifier[cf] operator[SEP] identifier[left] , identifier[cf] operator[SEP] identifier[right] operator[SEP] operator[SEP]
}
|
protected String buildInsertSQL(final TableMetadata metadata, final Class<? extends Object> type,
final SqlConfig sqlConfig, final boolean ignoreWhenEmpty) {
Map<String, MappingColumn> mappingColumns = MappingUtils.getMappingColumnMap(type, SqlKind.INSERT);
StringBuilder sql = buildInsertTargetBlock(metadata, mappingColumns, sqlConfig, ignoreWhenEmpty);
sql.append(" VALUES ");
sql.append(buildInsertRowBlock(metadata, mappingColumns, sqlConfig, ignoreWhenEmpty,
TableMetadata.Column::getCamelColumnName));
return sql.toString();
} | class class_name[name] begin[{]
method[buildInsertSQL, return_type[type[String]], modifier[protected], parameter[metadata, type, sqlConfig, ignoreWhenEmpty]] begin[{]
local_variable[type[Map], mappingColumns]
local_variable[type[StringBuilder], sql]
call[sql.append, parameter[literal[" VALUES "]]]
call[sql.append, parameter[call[.buildInsertRowBlock, parameter[member[.metadata], member[.mappingColumns], member[.sqlConfig], member[.ignoreWhenEmpty], MethodReference(expression=MemberReference(member=Column, postfix_operators=[], prefix_operators=[], qualifier=TableMetadata, selectors=[]), method=MemberReference(member=getCamelColumnName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]]]]
return[call[sql.toString, parameter[]]]
end[}]
END[}] | Keyword[protected] identifier[String] identifier[buildInsertSQL] operator[SEP] Keyword[final] identifier[TableMetadata] identifier[metadata] , Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Object] operator[>] identifier[type] , Keyword[final] identifier[SqlConfig] identifier[sqlConfig] , Keyword[final] Keyword[boolean] identifier[ignoreWhenEmpty] operator[SEP] {
identifier[Map] operator[<] identifier[String] , identifier[MappingColumn] operator[>] identifier[mappingColumns] operator[=] identifier[MappingUtils] operator[SEP] identifier[getMappingColumnMap] operator[SEP] identifier[type] , identifier[SqlKind] operator[SEP] identifier[INSERT] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[sql] operator[=] identifier[buildInsertTargetBlock] operator[SEP] identifier[metadata] , identifier[mappingColumns] , identifier[sqlConfig] , identifier[ignoreWhenEmpty] operator[SEP] operator[SEP] identifier[sql] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sql] operator[SEP] identifier[append] operator[SEP] identifier[buildInsertRowBlock] operator[SEP] identifier[metadata] , identifier[mappingColumns] , identifier[sqlConfig] , identifier[ignoreWhenEmpty] , identifier[TableMetadata] operator[SEP] identifier[Column] operator[::] identifier[getCamelColumnName] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[sql] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP]
}
|
public static PlanSummaryBean unmarshallPlanSummary(Map<String, Object> source) {
if (source == null) {
return null;
}
PlanSummaryBean bean = new PlanSummaryBean();
bean.setOrganizationId(asString(source.get("organizationId")));
bean.setOrganizationName(asString(source.get("organizationName")));
bean.setId(asString(source.get("id")));
bean.setName(asString(source.get("name")));
bean.setDescription(asString(source.get("description")));
postMarshall(bean);
return bean;
} | class class_name[name] begin[{]
method[unmarshallPlanSummary, return_type[type[PlanSummaryBean]], modifier[public static], parameter[source]] begin[{]
if[binary_operation[member[.source], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[PlanSummaryBean], bean]
call[bean.setOrganizationId, parameter[call[.asString, parameter[call[source.get, parameter[literal["organizationId"]]]]]]]
call[bean.setOrganizationName, parameter[call[.asString, parameter[call[source.get, parameter[literal["organizationName"]]]]]]]
call[bean.setId, parameter[call[.asString, parameter[call[source.get, parameter[literal["id"]]]]]]]
call[bean.setName, parameter[call[.asString, parameter[call[source.get, parameter[literal["name"]]]]]]]
call[bean.setDescription, parameter[call[.asString, parameter[call[source.get, parameter[literal["description"]]]]]]]
call[.postMarshall, parameter[member[.bean]]]
return[member[.bean]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[PlanSummaryBean] identifier[unmarshallPlanSummary] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[source] operator[SEP] {
Keyword[if] operator[SEP] identifier[source] operator[==] Other[null] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
identifier[PlanSummaryBean] identifier[bean] operator[=] Keyword[new] identifier[PlanSummaryBean] operator[SEP] operator[SEP] operator[SEP] identifier[bean] operator[SEP] identifier[setOrganizationId] operator[SEP] identifier[asString] operator[SEP] identifier[source] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bean] operator[SEP] identifier[setOrganizationName] operator[SEP] identifier[asString] operator[SEP] identifier[source] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bean] operator[SEP] identifier[setId] operator[SEP] identifier[asString] operator[SEP] identifier[source] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bean] operator[SEP] identifier[setName] operator[SEP] identifier[asString] operator[SEP] identifier[source] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bean] operator[SEP] identifier[setDescription] operator[SEP] identifier[asString] operator[SEP] identifier[source] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[postMarshall] operator[SEP] identifier[bean] operator[SEP] operator[SEP] Keyword[return] identifier[bean] operator[SEP]
}
|
private List<SimplifiedProject> toSimplifiedProjects(final List<Project> projects) {
final List<SimplifiedProject> simplifiedProjects = new ArrayList<>();
for (final Project p : projects) {
final SimplifiedProject sp =
new SimplifiedProject(p.getId(), p.getName(),
p.getLastModifiedUser(), p.getCreateTimestamp(),
p.getUserPermissions(), p.getGroupPermissions());
simplifiedProjects.add(sp);
}
return simplifiedProjects;
} | class class_name[name] begin[{]
method[toSimplifiedProjects, return_type[type[List]], modifier[private], parameter[projects]] begin[{]
local_variable[type[List], simplifiedProjects]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getLastModifiedUser, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getCreateTimestamp, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getUserPermissions, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getGroupPermissions, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SimplifiedProject, sub_type=None)), name=sp)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=SimplifiedProject, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=simplifiedProjects, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=projects, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=p)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Project, sub_type=None))), label=None)
return[member[.simplifiedProjects]]
end[}]
END[}] | Keyword[private] identifier[List] operator[<] identifier[SimplifiedProject] operator[>] identifier[toSimplifiedProjects] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Project] operator[>] identifier[projects] operator[SEP] {
Keyword[final] identifier[List] operator[<] identifier[SimplifiedProject] operator[>] identifier[simplifiedProjects] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Project] identifier[p] operator[:] identifier[projects] operator[SEP] {
Keyword[final] identifier[SimplifiedProject] identifier[sp] operator[=] Keyword[new] identifier[SimplifiedProject] operator[SEP] identifier[p] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[p] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[p] operator[SEP] identifier[getLastModifiedUser] operator[SEP] operator[SEP] , identifier[p] operator[SEP] identifier[getCreateTimestamp] operator[SEP] operator[SEP] , identifier[p] operator[SEP] identifier[getUserPermissions] operator[SEP] operator[SEP] , identifier[p] operator[SEP] identifier[getGroupPermissions] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[simplifiedProjects] operator[SEP] identifier[add] operator[SEP] identifier[sp] operator[SEP] operator[SEP]
}
Keyword[return] identifier[simplifiedProjects] operator[SEP]
}
|
public static <T> GenericResponseBuilder<T> status(Response.StatusType status) {
if (status == null) {
throw new NullPointerException("status:null");
}
return status(status.getStatusCode());
} | class class_name[name] begin[{]
method[status, return_type[type[GenericResponseBuilder]], modifier[public static], parameter[status]] begin[{]
if[binary_operation[member[.status], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="status:null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None)
else begin[{]
None
end[}]
return[call[.status, parameter[call[status.getStatusCode, parameter[]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[GenericResponseBuilder] operator[<] identifier[T] operator[>] identifier[status] operator[SEP] identifier[Response] operator[SEP] identifier[StatusType] identifier[status] operator[SEP] {
Keyword[if] operator[SEP] identifier[status] operator[==] Other[null] operator[SEP] {
Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP]
}
Keyword[return] identifier[status] operator[SEP] identifier[status] operator[SEP] identifier[getStatusCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP]
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.