code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public java.util.List<Workspace> getPendingRequests() { if (pendingRequests == null) { pendingRequests = new com.amazonaws.internal.SdkInternalList<Workspace>(); } return pendingRequests; }
class class_name[name] begin[{] method[getPendingRequests, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.pendingRequests], ==, literal[null]]] begin[{] assign[member[.pendingRequests], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Workspace, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.pendingRequests]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[Workspace] operator[>] identifier[getPendingRequests] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[pendingRequests] operator[==] Other[null] operator[SEP] { identifier[pendingRequests] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[Workspace] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[pendingRequests] operator[SEP] }
public static <T> ExpiringReference<T> create (T value, long expireMillis) { return new ExpiringReference<T>(value, expireMillis); }
class class_name[name] begin[{] method[create, return_type[type[ExpiringReference]], modifier[public static], parameter[value, expireMillis]] begin[{] return[ClassCreator(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=expireMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=ExpiringReference, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[ExpiringReference] operator[<] identifier[T] operator[>] identifier[create] operator[SEP] identifier[T] identifier[value] , Keyword[long] identifier[expireMillis] operator[SEP] { Keyword[return] Keyword[new] identifier[ExpiringReference] operator[<] identifier[T] operator[>] operator[SEP] identifier[value] , identifier[expireMillis] operator[SEP] operator[SEP] }
public void updateFromEntry(UpdateInodeFileEntry entry) { if (entry.hasPersistJobId()) { setPersistJobId(entry.getPersistJobId()); } if (entry.hasReplicationMax()) { setReplicationMax(entry.getReplicationMax()); } if (entry.hasReplicationMin()) { setReplicationMin(entry.getReplicationMin()); } if (entry.hasTempUfsPath()) { setTempUfsPath(entry.getTempUfsPath()); } if (entry.hasBlockSizeBytes()) { setBlockSizeBytes(entry.getBlockSizeBytes()); } if (entry.hasCacheable()) { setCacheable(entry.getCacheable()); } if (entry.hasCompleted()) { setCompleted(entry.getCompleted()); } if (entry.hasLength()) { setLength(entry.getLength()); } if (entry.getSetBlocksCount() > 0) { setBlockIds(entry.getSetBlocksList()); } }
class class_name[name] begin[{] method[updateFromEntry, return_type[void], modifier[public], parameter[entry]] begin[{] if[call[entry.hasPersistJobId, parameter[]]] begin[{] call[.setPersistJobId, parameter[call[entry.getPersistJobId, parameter[]]]] else begin[{] None end[}] if[call[entry.hasReplicationMax, parameter[]]] begin[{] call[.setReplicationMax, parameter[call[entry.getReplicationMax, parameter[]]]] else begin[{] None end[}] if[call[entry.hasReplicationMin, parameter[]]] begin[{] call[.setReplicationMin, parameter[call[entry.getReplicationMin, parameter[]]]] else begin[{] None end[}] if[call[entry.hasTempUfsPath, parameter[]]] begin[{] call[.setTempUfsPath, parameter[call[entry.getTempUfsPath, parameter[]]]] else begin[{] None end[}] if[call[entry.hasBlockSizeBytes, parameter[]]] begin[{] call[.setBlockSizeBytes, parameter[call[entry.getBlockSizeBytes, parameter[]]]] else begin[{] None end[}] if[call[entry.hasCacheable, parameter[]]] begin[{] call[.setCacheable, parameter[call[entry.getCacheable, parameter[]]]] else begin[{] None end[}] if[call[entry.hasCompleted, parameter[]]] begin[{] call[.setCompleted, parameter[call[entry.getCompleted, parameter[]]]] else begin[{] None end[}] if[call[entry.hasLength, parameter[]]] begin[{] call[.setLength, parameter[call[entry.getLength, parameter[]]]] else begin[{] None end[}] if[binary_operation[call[entry.getSetBlocksCount, parameter[]], >, literal[0]]] begin[{] call[.setBlockIds, parameter[call[entry.getSetBlocksList, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[updateFromEntry] operator[SEP] identifier[UpdateInodeFileEntry] identifier[entry] operator[SEP] { Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[hasPersistJobId] operator[SEP] operator[SEP] operator[SEP] { identifier[setPersistJobId] operator[SEP] identifier[entry] operator[SEP] identifier[getPersistJobId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[hasReplicationMax] operator[SEP] operator[SEP] operator[SEP] { identifier[setReplicationMax] operator[SEP] identifier[entry] operator[SEP] identifier[getReplicationMax] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[hasReplicationMin] operator[SEP] operator[SEP] operator[SEP] { identifier[setReplicationMin] operator[SEP] identifier[entry] operator[SEP] identifier[getReplicationMin] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[hasTempUfsPath] operator[SEP] operator[SEP] operator[SEP] { identifier[setTempUfsPath] operator[SEP] identifier[entry] operator[SEP] identifier[getTempUfsPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[hasBlockSizeBytes] operator[SEP] operator[SEP] operator[SEP] { identifier[setBlockSizeBytes] operator[SEP] identifier[entry] operator[SEP] identifier[getBlockSizeBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[hasCacheable] operator[SEP] operator[SEP] operator[SEP] { identifier[setCacheable] operator[SEP] identifier[entry] operator[SEP] identifier[getCacheable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[hasCompleted] operator[SEP] operator[SEP] operator[SEP] { identifier[setCompleted] operator[SEP] identifier[entry] operator[SEP] identifier[getCompleted] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[hasLength] operator[SEP] operator[SEP] operator[SEP] { identifier[setLength] operator[SEP] identifier[entry] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[getSetBlocksCount] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[setBlockIds] operator[SEP] identifier[entry] operator[SEP] identifier[getSetBlocksList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static int intersectQuad (float x1, float y1, float cx, float cy, float x2, float y2, float rx1, float ry1, float rx2, float ry2) { // LEFT/RIGHT/UP ------------------------------------------------------ if ((rx2 < x1 && rx2 < cx && rx2 < x2) || (rx1 > x1 && rx1 > cx && rx1 > x2) || (ry1 > y1 && ry1 > cy && ry1 > y2)) { return 0; } // DOWN --------------------------------------------------------------- if (ry2 < y1 && ry2 < cy && ry2 < y2 && rx1 != x1 && rx1 != x2) { if (x1 < x2) { return x1 < rx1 && rx1 < x2 ? 1 : 0; } return x2 < rx1 && rx1 < x1 ? -1 : 0; } // INSIDE ------------------------------------------------------------- QuadCurve c = new QuadCurve(x1, y1, cx, cy, x2, y2); float px1 = rx1 - x1; float py1 = ry1 - y1; float px2 = rx2 - x1; float py2 = ry2 - y1; float[] res1 = new float[3]; float[] res2 = new float[3]; int rc1 = c.solvePoint(res1, px1); int rc2 = c.solvePoint(res2, px2); // INSIDE-LEFT/RIGHT if (rc1 == 0 && rc2 == 0) { return 0; } // Build bound -------------------------------------------------------- float minX = px1 - DELTA; float maxX = px2 + DELTA; float[] bound = new float[28]; int bc = 0; // Add roots bc = c.addBound(bound, bc, res1, rc1, minX, maxX, false, 0); bc = c.addBound(bound, bc, res2, rc2, minX, maxX, false, 1); // Add extremal points rc2 = c.solveExtreme(res2); bc = c.addBound(bound, bc, res2, rc2, minX, maxX, true, 2); // Add start and end if (rx1 < x1 && x1 < rx2) { bound[bc++] = 0f; bound[bc++] = 0f; bound[bc++] = 0f; bound[bc++] = 4; } if (rx1 < x2 && x2 < rx2) { bound[bc++] = 1f; bound[bc++] = c.ax; bound[bc++] = c.ay; bound[bc++] = 5; } // End build bound ---------------------------------------------------- int cross = crossBound(bound, bc, py1, py2); if (cross != UNKNOWN) { return cross; } return c.cross(res1, rc1, py1, py2); }
class class_name[name] begin[{] method[intersectQuad, return_type[type[int]], modifier[public static], parameter[x1, y1, cx, cy, x2, y2, rx1, ry1, rx2, ry2]] begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[.rx2], <, member[.x1]], &&, binary_operation[member[.rx2], <, member[.cx]]], &&, binary_operation[member[.rx2], <, member[.x2]]], ||, binary_operation[binary_operation[binary_operation[member[.rx1], >, member[.x1]], &&, binary_operation[member[.rx1], >, member[.cx]]], &&, binary_operation[member[.rx1], >, member[.x2]]]], ||, binary_operation[binary_operation[binary_operation[member[.ry1], >, member[.y1]], &&, binary_operation[member[.ry1], >, member[.cy]]], &&, binary_operation[member[.ry1], >, member[.y2]]]]] begin[{] return[literal[0]] else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[.ry2], <, member[.y1]], &&, binary_operation[member[.ry2], <, member[.cy]]], &&, binary_operation[member[.ry2], <, member[.y2]]], &&, binary_operation[member[.rx1], !=, member[.x1]]], &&, binary_operation[member[.rx1], !=, member[.x2]]]] begin[{] if[binary_operation[member[.x1], <, member[.x2]]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=x1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=rx1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=rx1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=x2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operator=&&), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))] else begin[{] None end[}] return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=x2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=rx1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=rx1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=x1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operator=&&), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), if_true=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1))] else begin[{] None end[}] local_variable[type[QuadCurve], c] local_variable[type[float], px1] local_variable[type[float], py1] local_variable[type[float], px2] local_variable[type[float], py2] local_variable[type[float], res1] local_variable[type[float], res2] local_variable[type[int], rc1] local_variable[type[int], rc2] if[binary_operation[binary_operation[member[.rc1], ==, literal[0]], &&, binary_operation[member[.rc2], ==, literal[0]]]] begin[{] return[literal[0]] else begin[{] None end[}] local_variable[type[float], minX] local_variable[type[float], maxX] local_variable[type[float], bound] local_variable[type[int], bc] assign[member[.bc], call[c.addBound, parameter[member[.bound], member[.bc], member[.res1], member[.rc1], member[.minX], member[.maxX], literal[false], literal[0]]]] assign[member[.bc], call[c.addBound, parameter[member[.bound], member[.bc], member[.res2], member[.rc2], member[.minX], member[.maxX], literal[false], literal[1]]]] assign[member[.rc2], call[c.solveExtreme, parameter[member[.res2]]]] assign[member[.bc], call[c.addBound, parameter[member[.bound], member[.bc], member[.res2], member[.rc2], member[.minX], member[.maxX], literal[true], literal[2]]]] if[binary_operation[binary_operation[member[.rx1], <, member[.x1]], &&, binary_operation[member[.x1], <, member[.rx2]]]] begin[{] assign[member[.bound], literal[0f]] assign[member[.bound], literal[0f]] assign[member[.bound], literal[0f]] assign[member[.bound], literal[4]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.rx1], <, member[.x2]], &&, binary_operation[member[.x2], <, member[.rx2]]]] begin[{] assign[member[.bound], literal[1f]] assign[member[.bound], member[c.ax]] assign[member[.bound], member[c.ay]] assign[member[.bound], literal[5]] else begin[{] None end[}] local_variable[type[int], cross] if[binary_operation[member[.cross], !=, member[.UNKNOWN]]] begin[{] return[member[.cross]] else begin[{] None end[}] return[call[c.cross, parameter[member[.res1], member[.rc1], member[.py1], member[.py2]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[intersectQuad] operator[SEP] Keyword[float] identifier[x1] , Keyword[float] identifier[y1] , Keyword[float] identifier[cx] , Keyword[float] identifier[cy] , Keyword[float] identifier[x2] , Keyword[float] identifier[y2] , Keyword[float] identifier[rx1] , Keyword[float] identifier[ry1] , Keyword[float] identifier[rx2] , Keyword[float] identifier[ry2] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[rx2] operator[<] identifier[x1] operator[&&] identifier[rx2] operator[<] identifier[cx] operator[&&] identifier[rx2] operator[<] identifier[x2] operator[SEP] operator[||] operator[SEP] identifier[rx1] operator[>] identifier[x1] operator[&&] identifier[rx1] operator[>] identifier[cx] operator[&&] identifier[rx1] operator[>] identifier[x2] operator[SEP] operator[||] operator[SEP] identifier[ry1] operator[>] identifier[y1] operator[&&] identifier[ry1] operator[>] identifier[cy] operator[&&] identifier[ry1] operator[>] identifier[y2] operator[SEP] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[if] operator[SEP] identifier[ry2] operator[<] identifier[y1] operator[&&] identifier[ry2] operator[<] identifier[cy] operator[&&] identifier[ry2] operator[<] identifier[y2] operator[&&] identifier[rx1] operator[!=] identifier[x1] operator[&&] identifier[rx1] operator[!=] identifier[x2] operator[SEP] { Keyword[if] operator[SEP] identifier[x1] operator[<] identifier[x2] operator[SEP] { Keyword[return] identifier[x1] operator[<] identifier[rx1] operator[&&] identifier[rx1] operator[<] identifier[x2] operator[?] Other[1] operator[:] Other[0] operator[SEP] } Keyword[return] identifier[x2] operator[<] identifier[rx1] operator[&&] identifier[rx1] operator[<] identifier[x1] operator[?] operator[-] Other[1] operator[:] Other[0] operator[SEP] } identifier[QuadCurve] identifier[c] operator[=] Keyword[new] identifier[QuadCurve] operator[SEP] identifier[x1] , identifier[y1] , identifier[cx] , identifier[cy] , identifier[x2] , identifier[y2] operator[SEP] operator[SEP] Keyword[float] identifier[px1] operator[=] identifier[rx1] operator[-] identifier[x1] operator[SEP] Keyword[float] identifier[py1] operator[=] identifier[ry1] operator[-] identifier[y1] operator[SEP] Keyword[float] identifier[px2] operator[=] identifier[rx2] operator[-] identifier[x1] operator[SEP] Keyword[float] identifier[py2] operator[=] identifier[ry2] operator[-] identifier[y1] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[res1] operator[=] Keyword[new] Keyword[float] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[res2] operator[=] Keyword[new] Keyword[float] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[int] identifier[rc1] operator[=] identifier[c] operator[SEP] identifier[solvePoint] operator[SEP] identifier[res1] , identifier[px1] operator[SEP] operator[SEP] Keyword[int] identifier[rc2] operator[=] identifier[c] operator[SEP] identifier[solvePoint] operator[SEP] identifier[res2] , identifier[px2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rc1] operator[==] Other[0] operator[&&] identifier[rc2] operator[==] Other[0] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[float] identifier[minX] operator[=] identifier[px1] operator[-] identifier[DELTA] operator[SEP] Keyword[float] identifier[maxX] operator[=] identifier[px2] operator[+] identifier[DELTA] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[bound] operator[=] Keyword[new] Keyword[float] operator[SEP] Other[28] operator[SEP] operator[SEP] Keyword[int] identifier[bc] operator[=] Other[0] operator[SEP] identifier[bc] operator[=] identifier[c] operator[SEP] identifier[addBound] operator[SEP] identifier[bound] , identifier[bc] , identifier[res1] , identifier[rc1] , identifier[minX] , identifier[maxX] , literal[boolean] , Other[0] operator[SEP] operator[SEP] identifier[bc] operator[=] identifier[c] operator[SEP] identifier[addBound] operator[SEP] identifier[bound] , identifier[bc] , identifier[res2] , identifier[rc2] , identifier[minX] , identifier[maxX] , literal[boolean] , Other[1] operator[SEP] operator[SEP] identifier[rc2] operator[=] identifier[c] operator[SEP] identifier[solveExtreme] operator[SEP] identifier[res2] operator[SEP] operator[SEP] identifier[bc] operator[=] identifier[c] operator[SEP] identifier[addBound] operator[SEP] identifier[bound] , identifier[bc] , identifier[res2] , identifier[rc2] , identifier[minX] , identifier[maxX] , literal[boolean] , Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rx1] operator[<] identifier[x1] operator[&&] identifier[x1] operator[<] identifier[rx2] operator[SEP] { identifier[bound] operator[SEP] identifier[bc] operator[++] operator[SEP] operator[=] literal[Float] operator[SEP] identifier[bound] operator[SEP] identifier[bc] operator[++] operator[SEP] operator[=] literal[Float] operator[SEP] identifier[bound] operator[SEP] identifier[bc] operator[++] operator[SEP] operator[=] literal[Float] operator[SEP] identifier[bound] operator[SEP] identifier[bc] operator[++] operator[SEP] operator[=] Other[4] operator[SEP] } Keyword[if] operator[SEP] identifier[rx1] operator[<] identifier[x2] operator[&&] identifier[x2] operator[<] identifier[rx2] operator[SEP] { identifier[bound] operator[SEP] identifier[bc] operator[++] operator[SEP] operator[=] literal[Float] operator[SEP] identifier[bound] operator[SEP] identifier[bc] operator[++] operator[SEP] operator[=] identifier[c] operator[SEP] identifier[ax] operator[SEP] identifier[bound] operator[SEP] identifier[bc] operator[++] operator[SEP] operator[=] identifier[c] operator[SEP] identifier[ay] operator[SEP] identifier[bound] operator[SEP] identifier[bc] operator[++] operator[SEP] operator[=] Other[5] operator[SEP] } Keyword[int] identifier[cross] operator[=] identifier[crossBound] operator[SEP] identifier[bound] , identifier[bc] , identifier[py1] , identifier[py2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cross] operator[!=] identifier[UNKNOWN] operator[SEP] { Keyword[return] identifier[cross] operator[SEP] } Keyword[return] identifier[c] operator[SEP] identifier[cross] operator[SEP] identifier[res1] , identifier[rc1] , identifier[py1] , identifier[py2] operator[SEP] operator[SEP] }
public static Update forEach(String field, UpdateQuery q, ForEachUpdate u) { Update x = new Update(false); ObjectNode fe = JsonNodeFactory.instance.objectNode(); fe.set(field, q.toJson()); fe.set("$update", u.toJson()); ((ObjectNode) x.node).set("$foreach", fe); return x; }
class class_name[name] begin[{] method[forEach, return_type[type[Update]], modifier[public static], parameter[field, q, u]] begin[{] local_variable[type[Update], x] local_variable[type[ObjectNode], fe] call[fe.set, parameter[member[.field], call[q.toJson, parameter[]]]] call[fe.set, parameter[literal["$update"], call[u.toJson, parameter[]]]] Cast(expression=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=x, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ObjectNode, sub_type=None)) return[member[.x]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Update] identifier[forEach] operator[SEP] identifier[String] identifier[field] , identifier[UpdateQuery] identifier[q] , identifier[ForEachUpdate] identifier[u] operator[SEP] { identifier[Update] identifier[x] operator[=] Keyword[new] identifier[Update] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[ObjectNode] identifier[fe] operator[=] identifier[JsonNodeFactory] operator[SEP] identifier[instance] operator[SEP] identifier[objectNode] operator[SEP] operator[SEP] operator[SEP] identifier[fe] operator[SEP] identifier[set] operator[SEP] identifier[field] , identifier[q] operator[SEP] identifier[toJson] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[fe] operator[SEP] identifier[set] operator[SEP] literal[String] , identifier[u] operator[SEP] identifier[toJson] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ObjectNode] operator[SEP] identifier[x] operator[SEP] identifier[node] operator[SEP] operator[SEP] identifier[set] operator[SEP] literal[String] , identifier[fe] operator[SEP] operator[SEP] Keyword[return] identifier[x] operator[SEP] }
public HttpInputStream get(URL url, boolean failIfNotOK, boolean followRedirects) throws IOException { String urlString = url.toString(); // presuming that not following redirects means no // preemptive authN HttpClient client = getHttpClient(followRedirects, followRedirects); HttpGet getMethod = new HttpGet(urlString); HttpInputStream in = new HttpInputStream(client, getMethod); int status = in.getStatusCode(); logger.debug("GET {} : {}", urlString, status); if (failIfNotOK) { if (status != 200) { if (followRedirects && 300 <= status && status <= 399) { // Handle the redirect here ! logger.debug( "FedoraClient is handling redirect for HTTP STATUS={}", status); Header hLoc = in.getResponseHeader(HttpHeaders.LOCATION); if (hLoc != null) { String location = hLoc.getValue(); logger.debug("FedoraClient is trying redirect location: {}", location); // Try the redirect location, but don't try to handle another level of redirection. in.close(); return get(location, true, false); } else { try { throw new IOException("Request failed [" + status + " " + in.getStatusText() + "]"); } finally { try { in.close(); } catch (Exception e) { logger.error("Can't close InputStream: " + e.getMessage()); } } } } else { try { throw new IOException("Request failed [" + in.getStatusCode() + " " + in.getStatusText() + "] : " + urlString); } finally { try { in.close(); } catch (Exception e) { logger.error("Can't close InputStream: " + e.getMessage()); } } } } } return in; }
class class_name[name] begin[{] method[get, return_type[type[HttpInputStream]], modifier[public], parameter[url, failIfNotOK, followRedirects]] begin[{] local_variable[type[String], urlString] local_variable[type[HttpClient], client] local_variable[type[HttpGet], getMethod] local_variable[type[HttpInputStream], in] local_variable[type[int], status] call[logger.debug, parameter[literal["GET {} : {}"], member[.urlString], member[.status]]] if[member[.failIfNotOK]] begin[{] if[binary_operation[member[.status], !=, literal[200]]] begin[{] if[binary_operation[binary_operation[member[.followRedirects], &&, binary_operation[literal[300], <=, member[.status]]], &&, binary_operation[member[.status], <=, literal[399]]]] begin[{] call[logger.debug, parameter[literal["FedoraClient is handling redirect for HTTP STATUS={}"], member[.status]]] local_variable[type[Header], hLoc] if[binary_operation[member[.hLoc], !=, literal[null]]] begin[{] local_variable[type[String], location] call[logger.debug, parameter[literal["FedoraClient is trying redirect location: {}"], member[.location]]] call[in.close, parameter[]] return[call[.get, parameter[member[.location], literal[true], literal[false]]]] else begin[{] TryStatement(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Request failed ["), operandr=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), operator=+), operandr=MethodInvocation(arguments=[], member=getStatusText, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)], catches=None, finally_block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can't close InputStream: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)], label=None, resources=None) end[}] else begin[{] TryStatement(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Request failed ["), operandr=MethodInvocation(arguments=[], member=getStatusCode, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), operator=+), operandr=MethodInvocation(arguments=[], member=getStatusText, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] : "), operator=+), operandr=MemberReference(member=urlString, 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)], catches=None, finally_block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can't close InputStream: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)], label=None, resources=None) end[}] else begin[{] None end[}] else begin[{] None end[}] return[member[.in]] end[}] END[}]
Keyword[public] identifier[HttpInputStream] identifier[get] operator[SEP] identifier[URL] identifier[url] , Keyword[boolean] identifier[failIfNotOK] , Keyword[boolean] identifier[followRedirects] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[urlString] operator[=] identifier[url] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[HttpClient] identifier[client] operator[=] identifier[getHttpClient] operator[SEP] identifier[followRedirects] , identifier[followRedirects] operator[SEP] operator[SEP] identifier[HttpGet] identifier[getMethod] operator[=] Keyword[new] identifier[HttpGet] operator[SEP] identifier[urlString] operator[SEP] operator[SEP] identifier[HttpInputStream] identifier[in] operator[=] Keyword[new] identifier[HttpInputStream] operator[SEP] identifier[client] , identifier[getMethod] operator[SEP] operator[SEP] Keyword[int] identifier[status] operator[=] identifier[in] operator[SEP] identifier[getStatusCode] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[urlString] , identifier[status] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[failIfNotOK] operator[SEP] { Keyword[if] operator[SEP] identifier[status] operator[!=] Other[200] operator[SEP] { Keyword[if] operator[SEP] identifier[followRedirects] operator[&&] Other[300] operator[<=] identifier[status] operator[&&] identifier[status] operator[<=] Other[399] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[status] operator[SEP] operator[SEP] identifier[Header] identifier[hLoc] operator[=] identifier[in] operator[SEP] identifier[getResponseHeader] operator[SEP] identifier[HttpHeaders] operator[SEP] identifier[LOCATION] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hLoc] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[location] operator[=] identifier[hLoc] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[location] operator[SEP] operator[SEP] identifier[in] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[get] operator[SEP] identifier[location] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { Keyword[try] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[status] operator[+] literal[String] operator[+] identifier[in] operator[SEP] identifier[getStatusText] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[try] { identifier[in] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[else] { Keyword[try] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[in] operator[SEP] identifier[getStatusCode] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[in] operator[SEP] identifier[getStatusText] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[urlString] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[try] { identifier[in] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } } } Keyword[return] identifier[in] operator[SEP] }
@Override public CPOption create(long CPOptionId) { CPOption cpOption = new CPOptionImpl(); cpOption.setNew(true); cpOption.setPrimaryKey(CPOptionId); String uuid = PortalUUIDUtil.generate(); cpOption.setUuid(uuid); cpOption.setCompanyId(companyProvider.getCompanyId()); return cpOption; }
class class_name[name] begin[{] method[create, return_type[type[CPOption]], modifier[public], parameter[CPOptionId]] begin[{] local_variable[type[CPOption], cpOption] call[cpOption.setNew, parameter[literal[true]]] call[cpOption.setPrimaryKey, parameter[member[.CPOptionId]]] local_variable[type[String], uuid] call[cpOption.setUuid, parameter[member[.uuid]]] call[cpOption.setCompanyId, parameter[call[companyProvider.getCompanyId, parameter[]]]] return[member[.cpOption]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CPOption] identifier[create] operator[SEP] Keyword[long] identifier[CPOptionId] operator[SEP] { identifier[CPOption] identifier[cpOption] operator[=] Keyword[new] identifier[CPOptionImpl] operator[SEP] operator[SEP] operator[SEP] identifier[cpOption] operator[SEP] identifier[setNew] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[cpOption] operator[SEP] identifier[setPrimaryKey] operator[SEP] identifier[CPOptionId] operator[SEP] operator[SEP] identifier[String] identifier[uuid] operator[=] identifier[PortalUUIDUtil] operator[SEP] identifier[generate] operator[SEP] operator[SEP] operator[SEP] identifier[cpOption] operator[SEP] identifier[setUuid] operator[SEP] identifier[uuid] operator[SEP] operator[SEP] identifier[cpOption] operator[SEP] identifier[setCompanyId] operator[SEP] identifier[companyProvider] operator[SEP] identifier[getCompanyId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[cpOption] operator[SEP] }
public static double distanceToNearestPoint(Point point, Front front, PointDistance distance) { if (front == null) { throw new NullFrontException(); } else if (front.getNumberOfPoints() == 0) { throw new EmptyFrontException(); } else if (point == null) { throw new JMetalException("The point is null"); } double minDistance = Double.MAX_VALUE; for (int i = 0; i < front.getNumberOfPoints(); i++) { double aux = distance.compute(point, front.getPoint(i)); if ((aux < minDistance) && (aux > 0.0)) { minDistance = aux; } } return minDistance; }
class class_name[name] begin[{] method[distanceToNearestPoint, return_type[type[double]], modifier[public static], parameter[point, front, distance]] begin[{] if[binary_operation[member[.front], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullFrontException, sub_type=None)), label=None) else begin[{] if[binary_operation[call[front.getNumberOfPoints, parameter[]], ==, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EmptyFrontException, sub_type=None)), label=None) else begin[{] if[binary_operation[member[.point], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The point is null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JMetalException, sub_type=None)), label=None) else begin[{] None end[}] end[}] end[}] local_variable[type[double], minDistance] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=point, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPoint, postfix_operators=[], prefix_operators=[], qualifier=front, selectors=[], type_arguments=None)], member=compute, postfix_operators=[], prefix_operators=[], qualifier=distance, selectors=[], type_arguments=None), name=aux)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=aux, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=minDistance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=aux, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0), operator=>), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=minDistance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=aux, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getNumberOfPoints, postfix_operators=[], prefix_operators=[], qualifier=front, 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[.minDistance]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[distanceToNearestPoint] operator[SEP] identifier[Point] identifier[point] , identifier[Front] identifier[front] , identifier[PointDistance] identifier[distance] operator[SEP] { Keyword[if] operator[SEP] identifier[front] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullFrontException] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[front] operator[SEP] identifier[getNumberOfPoints] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[EmptyFrontException] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[point] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[JMetalException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[double] identifier[minDistance] operator[=] identifier[Double] operator[SEP] identifier[MAX_VALUE] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[front] operator[SEP] identifier[getNumberOfPoints] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[double] identifier[aux] operator[=] identifier[distance] operator[SEP] identifier[compute] operator[SEP] identifier[point] , identifier[front] operator[SEP] identifier[getPoint] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[aux] operator[<] identifier[minDistance] operator[SEP] operator[&&] operator[SEP] identifier[aux] operator[>] literal[Float] operator[SEP] operator[SEP] { identifier[minDistance] operator[=] identifier[aux] operator[SEP] } } Keyword[return] identifier[minDistance] operator[SEP] }
public void setNames(FSArray v) { if (EntityAttribute_Type.featOkTst && ((EntityAttribute_Type)jcasType).casFeat_names == null) jcasType.jcas.throwFeatMissing("names", "de.julielab.jules.types.ace.EntityAttribute"); jcasType.ll_cas.ll_setRefValue(addr, ((EntityAttribute_Type)jcasType).casFeatCode_names, jcasType.ll_cas.ll_getFSRef(v));}
class class_name[name] begin[{] method[setNames, return_type[void], modifier[public], parameter[v]] begin[{] if[binary_operation[member[EntityAttribute_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=EntityAttribute_Type, sub_type=None)), ==, literal[null]]]] begin[{] call[jcasType.jcas.throwFeatMissing, parameter[literal["names"], literal["de.julielab.jules.types.ace.EntityAttribute"]]] else begin[{] None end[}] call[jcasType.ll_cas.ll_setRefValue, parameter[member[.addr], Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=EntityAttribute_Type, sub_type=None)), call[jcasType.ll_cas.ll_getFSRef, parameter[member[.v]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setNames] operator[SEP] identifier[FSArray] identifier[v] operator[SEP] { Keyword[if] operator[SEP] identifier[EntityAttribute_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[EntityAttribute_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeat_names] operator[==] Other[null] operator[SEP] identifier[jcasType] operator[SEP] identifier[jcas] operator[SEP] identifier[throwFeatMissing] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_setRefValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[EntityAttribute_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_names] , identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getFSRef] operator[SEP] identifier[v] operator[SEP] operator[SEP] operator[SEP] }
public ProcessInstance lockProcessInstance(final ProcessInstance processInstance, final boolean techSupport, final String userName) { List<Lock> locks = ContextUtils.getLocks(processInstance,getLockFactory(),"nz.co.senanque.workflow.WorkflowClient.lock(ProcessInstance)"); LockTemplate lockTemplate = new LockTemplate(locks, new LockAction() { public void doAction() { String taskId = ProcessInstanceUtils.getTaskId(processInstance); ProcessInstance pi = getWorkflowDAO().refreshProcessInstance(processInstance); // if (log.isDebugEnabled()) { // log.debug("taskId {} ProcessInstanceUtils.getTaskId(pi) {} {}",taskId,ProcessInstanceUtils.getTaskId(pi),(!taskId.equals(ProcessInstanceUtils.getTaskId(pi)))); // log.debug("pi.getStatus() {} techSupport {} {}",pi.getStatus(),techSupport,((pi.getStatus() != TaskStatus.WAIT) && !techSupport)); // log.debug("pi.getStatus() {} userName {} pi.getLockedBy() {} {}",pi.getStatus(),userName,pi.getLockedBy(),(pi.getStatus() == TaskStatus.BUSY) && !userName.equals(pi.getLockedBy()) && !techSupport); // } if (!techSupport) { if (!(taskId.equals(ProcessInstanceUtils.getTaskId(pi)) && ((pi.getStatus() == TaskStatus.WAIT) || ((pi.getStatus() == TaskStatus.BUSY) && userName.equals(pi.getLockedBy()))))) { // // In this case we did not actually fail to get the lock but // // the process is not in the state // // it was in when we saw it in the table because another // // user (probably) has updated it. // // Therefore it is dangerous to proceed (unless we are tech support) throw new RuntimeException("ProcessInstance is already busy"); } } pi.setStatus(TaskStatus.BUSY); pi.setLockedBy(userName); TaskBase task = getCurrentTask(pi); Audit audit = createAudit(pi, task); getWorkflowDAO().mergeProcessInstance(pi); } }); boolean weAreOkay = true; try { weAreOkay = lockTemplate.doAction(); } catch (Exception e) { weAreOkay = false; } if (!weAreOkay) { return null; } return getWorkflowDAO().refreshProcessInstance(processInstance); }
class class_name[name] begin[{] method[lockProcessInstance, return_type[type[ProcessInstance]], modifier[public], parameter[processInstance, techSupport, userName]] begin[{] local_variable[type[List], locks] local_variable[type[LockTemplate], lockTemplate] local_variable[type[boolean], weAreOkay] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=weAreOkay, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=doAction, postfix_operators=[], prefix_operators=[], qualifier=lockTemplate, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=weAreOkay, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) if[member[.weAreOkay]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[.getWorkflowDAO, parameter[]]] end[}] END[}]
Keyword[public] identifier[ProcessInstance] identifier[lockProcessInstance] operator[SEP] Keyword[final] identifier[ProcessInstance] identifier[processInstance] , Keyword[final] Keyword[boolean] identifier[techSupport] , Keyword[final] identifier[String] identifier[userName] operator[SEP] { identifier[List] operator[<] identifier[Lock] operator[>] identifier[locks] operator[=] identifier[ContextUtils] operator[SEP] identifier[getLocks] operator[SEP] identifier[processInstance] , identifier[getLockFactory] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[LockTemplate] identifier[lockTemplate] operator[=] Keyword[new] identifier[LockTemplate] operator[SEP] identifier[locks] , Keyword[new] identifier[LockAction] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[doAction] operator[SEP] operator[SEP] { identifier[String] identifier[taskId] operator[=] identifier[ProcessInstanceUtils] operator[SEP] identifier[getTaskId] operator[SEP] identifier[processInstance] operator[SEP] operator[SEP] identifier[ProcessInstance] identifier[pi] operator[=] identifier[getWorkflowDAO] operator[SEP] operator[SEP] operator[SEP] identifier[refreshProcessInstance] operator[SEP] identifier[processInstance] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[techSupport] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[taskId] operator[SEP] identifier[equals] operator[SEP] identifier[ProcessInstanceUtils] operator[SEP] identifier[getTaskId] operator[SEP] identifier[pi] operator[SEP] operator[SEP] operator[&&] operator[SEP] operator[SEP] identifier[pi] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[==] identifier[TaskStatus] operator[SEP] identifier[WAIT] operator[SEP] operator[||] operator[SEP] operator[SEP] identifier[pi] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[==] identifier[TaskStatus] operator[SEP] identifier[BUSY] operator[SEP] operator[&&] identifier[userName] operator[SEP] identifier[equals] operator[SEP] identifier[pi] operator[SEP] identifier[getLockedBy] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } identifier[pi] operator[SEP] identifier[setStatus] operator[SEP] identifier[TaskStatus] operator[SEP] identifier[BUSY] operator[SEP] operator[SEP] identifier[pi] operator[SEP] identifier[setLockedBy] operator[SEP] identifier[userName] operator[SEP] operator[SEP] identifier[TaskBase] identifier[task] operator[=] identifier[getCurrentTask] operator[SEP] identifier[pi] operator[SEP] operator[SEP] identifier[Audit] identifier[audit] operator[=] identifier[createAudit] operator[SEP] identifier[pi] , identifier[task] operator[SEP] operator[SEP] identifier[getWorkflowDAO] operator[SEP] operator[SEP] operator[SEP] identifier[mergeProcessInstance] operator[SEP] identifier[pi] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] Keyword[boolean] identifier[weAreOkay] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[weAreOkay] operator[=] identifier[lockTemplate] operator[SEP] identifier[doAction] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[weAreOkay] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[weAreOkay] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[getWorkflowDAO] operator[SEP] operator[SEP] operator[SEP] identifier[refreshProcessInstance] operator[SEP] identifier[processInstance] operator[SEP] operator[SEP] }
public void setStackSummaries(java.util.Collection<StackSummary> stackSummaries) { if (stackSummaries == null) { this.stackSummaries = null; return; } this.stackSummaries = new com.amazonaws.internal.SdkInternalList<StackSummary>(stackSummaries); }
class class_name[name] begin[{] method[setStackSummaries, return_type[void], modifier[public], parameter[stackSummaries]] begin[{] if[binary_operation[member[.stackSummaries], ==, literal[null]]] begin[{] assign[THIS[member[None.stackSummaries]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.stackSummaries]], ClassCreator(arguments=[MemberReference(member=stackSummaries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=StackSummary, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setStackSummaries] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[StackSummary] operator[>] identifier[stackSummaries] operator[SEP] { Keyword[if] operator[SEP] identifier[stackSummaries] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[stackSummaries] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[stackSummaries] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[StackSummary] operator[>] operator[SEP] identifier[stackSummaries] operator[SEP] operator[SEP] }
public DateInterval move( long amount, IsoDateUnit unit ) { if (amount == 0) { return this; } Boundary<PlainDate> s; Boundary<PlainDate> e; if (this.getStart().isInfinite()) { s = Boundary.infinitePast(); } else { s = Boundary.of( this.getStart().getEdge(), this.getStart().getTemporal().plus(amount, unit)); } if (this.getEnd().isInfinite()) { e = Boundary.infiniteFuture(); } else { e = Boundary.of( this.getEnd().getEdge(), this.getEnd().getTemporal().plus(amount, unit)); } return new DateInterval(s, e); }
class class_name[name] begin[{] method[move, return_type[type[DateInterval]], modifier[public], parameter[amount, unit]] begin[{] if[binary_operation[member[.amount], ==, literal[0]]] begin[{] return[THIS[]] else begin[{] None end[}] local_variable[type[Boundary], s] local_variable[type[Boundary], e] if[THIS[call[None.getStart, parameter[]]call[None.isInfinite, parameter[]]]] begin[{] assign[member[.s], call[Boundary.infinitePast, parameter[]]] else begin[{] assign[member[.s], call[Boundary.of, parameter[THIS[call[None.getStart, parameter[]]call[None.getEdge, parameter[]]], THIS[call[None.getStart, parameter[]]call[None.getTemporal, parameter[]]call[None.plus, parameter[member[.amount], member[.unit]]]]]]] end[}] if[THIS[call[None.getEnd, parameter[]]call[None.isInfinite, parameter[]]]] begin[{] assign[member[.e], call[Boundary.infiniteFuture, parameter[]]] else begin[{] assign[member[.e], call[Boundary.of, parameter[THIS[call[None.getEnd, parameter[]]call[None.getEdge, parameter[]]], THIS[call[None.getEnd, parameter[]]call[None.getTemporal, parameter[]]call[None.plus, parameter[member[.amount], member[.unit]]]]]]] end[}] return[ClassCreator(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DateInterval, sub_type=None))] end[}] END[}]
Keyword[public] identifier[DateInterval] identifier[move] operator[SEP] Keyword[long] identifier[amount] , identifier[IsoDateUnit] identifier[unit] operator[SEP] { Keyword[if] operator[SEP] identifier[amount] operator[==] Other[0] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] } identifier[Boundary] operator[<] identifier[PlainDate] operator[>] identifier[s] operator[SEP] identifier[Boundary] operator[<] identifier[PlainDate] operator[>] identifier[e] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] operator[SEP] identifier[isInfinite] operator[SEP] operator[SEP] operator[SEP] { identifier[s] operator[=] identifier[Boundary] operator[SEP] identifier[infinitePast] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[s] operator[=] identifier[Boundary] operator[SEP] identifier[of] operator[SEP] Keyword[this] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] operator[SEP] identifier[getEdge] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] operator[SEP] identifier[getTemporal] operator[SEP] operator[SEP] operator[SEP] identifier[plus] operator[SEP] identifier[amount] , identifier[unit] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getEnd] operator[SEP] operator[SEP] operator[SEP] identifier[isInfinite] operator[SEP] operator[SEP] operator[SEP] { identifier[e] operator[=] identifier[Boundary] operator[SEP] identifier[infiniteFuture] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[e] operator[=] identifier[Boundary] operator[SEP] identifier[of] operator[SEP] Keyword[this] operator[SEP] identifier[getEnd] operator[SEP] operator[SEP] operator[SEP] identifier[getEdge] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[getEnd] operator[SEP] operator[SEP] operator[SEP] identifier[getTemporal] operator[SEP] operator[SEP] operator[SEP] identifier[plus] operator[SEP] identifier[amount] , identifier[unit] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[DateInterval] operator[SEP] identifier[s] , identifier[e] operator[SEP] operator[SEP] }
public static final <T> Stream<T> diGraph(T root, Function<? super T, ? extends Stream<T>> edges) { return DiGraphIterator.stream(root, edges); }
class class_name[name] begin[{] method[diGraph, return_type[type[Stream]], modifier[final public static], parameter[root, edges]] begin[{] return[call[DiGraphIterator.stream, parameter[member[.root], member[.edges]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] operator[<] identifier[T] operator[>] identifier[Stream] operator[<] identifier[T] operator[>] identifier[diGraph] operator[SEP] identifier[T] identifier[root] , identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[Stream] operator[<] identifier[T] operator[>] operator[>] identifier[edges] operator[SEP] { Keyword[return] identifier[DiGraphIterator] operator[SEP] identifier[stream] operator[SEP] identifier[root] , identifier[edges] operator[SEP] operator[SEP] }
public static void main(String[] args) { BasicConfigurator.configure(new ConsoleAppender( new PatternLayout("%d [%-25t] %-5p: %m%n"))); CmdLineParser parser = new CmdLineParser(); CmdLineParser.Option help = parser.addBooleanOption('h', "help"); CmdLineParser.Option port = parser.addIntegerOption('p', "port"); try { parser.parse(args); } catch (CmdLineParser.OptionException oe) { System.err.println(oe.getMessage()); usage(System.err); System.exit(1); } // Display help and exit if requested if (Boolean.TRUE.equals((Boolean)parser.getOptionValue(help))) { usage(System.out); System.exit(0); } Integer portValue = (Integer)parser.getOptionValue(port, Integer.valueOf(Tracker.DEFAULT_TRACKER_PORT)); String[] otherArgs = parser.getRemainingArgs(); if (otherArgs.length > 1) { usage(System.err); System.exit(1); } // Get directory from command-line argument or default to current // directory String directory = otherArgs.length > 0 ? otherArgs[0] : "."; FilenameFilter filter = new FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.endsWith(".torrent"); } }; try { Tracker t = new Tracker(portValue); File parent = new File(directory); for (File f : parent.listFiles(filter)) { logger.info("Loading torrent from " + f.getName()); t.announce(TrackedTorrent.load(f)); } logger.info("Starting tracker with {} announced torrents...", t.getTrackedTorrents().size()); t.start(true); } catch (Exception e) { logger.error("{}", e.getMessage(), e); System.exit(2); } }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] call[BasicConfigurator.configure, parameter[ClassCreator(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="%d [%-25t] %-5p: %m%n")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PatternLayout, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ConsoleAppender, sub_type=None))]] local_variable[type[CmdLineParser], parser] local_variable[type[CmdLineParser], help] local_variable[type[CmdLineParser], port] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=oe, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[])], member=usage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=exit, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=oe, types=['CmdLineParser.OptionException']))], finally_block=None, label=None, resources=None) if[call[Boolean.TRUE.equals, parameter[Cast(expression=MethodInvocation(arguments=[MemberReference(member=help, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOptionValue, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))]]] begin[{] call[.usage, parameter[member[System.out]]] call[System.exit, parameter[literal[0]]] else begin[{] None end[}] local_variable[type[Integer], portValue] local_variable[type[String], otherArgs] if[binary_operation[member[otherArgs.length], >, literal[1]]] begin[{] call[.usage, parameter[member[System.err]]] call[System.exit, parameter[literal[1]]] else begin[{] None end[}] local_variable[type[String], directory] local_variable[type[FilenameFilter], filter] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=portValue, 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=Tracker, sub_type=None)), name=t)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Tracker, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=directory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), name=parent)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Loading torrent from "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=load, postfix_operators=[], prefix_operators=[], qualifier=TrackedTorrent, selectors=[], type_arguments=None)], member=announce, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=listFiles, postfix_operators=[], prefix_operators=[], qualifier=parent, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Starting tracker with {} announced torrents..."), MethodInvocation(arguments=[], member=getTrackedTorrents, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=info, 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=true)], member=start, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="{}"), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=exit, postfix_operators=[], prefix_operators=[], qualifier=System, 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) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { identifier[BasicConfigurator] operator[SEP] identifier[configure] operator[SEP] Keyword[new] identifier[ConsoleAppender] operator[SEP] Keyword[new] identifier[PatternLayout] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[CmdLineParser] identifier[parser] operator[=] Keyword[new] identifier[CmdLineParser] operator[SEP] operator[SEP] operator[SEP] identifier[CmdLineParser] operator[SEP] identifier[Option] identifier[help] operator[=] identifier[parser] operator[SEP] identifier[addBooleanOption] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[CmdLineParser] operator[SEP] identifier[Option] identifier[port] operator[=] identifier[parser] operator[SEP] identifier[addIntegerOption] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[parser] operator[SEP] identifier[parse] operator[SEP] identifier[args] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CmdLineParser] operator[SEP] identifier[OptionException] identifier[oe] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] identifier[oe] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[usage] operator[SEP] identifier[System] operator[SEP] identifier[err] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[exit] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[Boolean] operator[SEP] identifier[TRUE] operator[SEP] identifier[equals] operator[SEP] operator[SEP] identifier[Boolean] operator[SEP] identifier[parser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[help] operator[SEP] operator[SEP] operator[SEP] { identifier[usage] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[exit] operator[SEP] Other[0] operator[SEP] operator[SEP] } identifier[Integer] identifier[portValue] operator[=] operator[SEP] identifier[Integer] operator[SEP] identifier[parser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[port] , identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[Tracker] operator[SEP] identifier[DEFAULT_TRACKER_PORT] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[otherArgs] operator[=] identifier[parser] operator[SEP] identifier[getRemainingArgs] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[otherArgs] operator[SEP] identifier[length] operator[>] Other[1] operator[SEP] { identifier[usage] operator[SEP] identifier[System] operator[SEP] identifier[err] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[exit] operator[SEP] Other[1] operator[SEP] operator[SEP] } identifier[String] identifier[directory] operator[=] identifier[otherArgs] operator[SEP] identifier[length] operator[>] Other[0] operator[?] identifier[otherArgs] operator[SEP] Other[0] operator[SEP] operator[:] literal[String] operator[SEP] identifier[FilenameFilter] identifier[filter] operator[=] Keyword[new] identifier[FilenameFilter] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[accept] operator[SEP] identifier[File] identifier[dir] , identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[name] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] } } operator[SEP] Keyword[try] { identifier[Tracker] identifier[t] operator[=] Keyword[new] identifier[Tracker] operator[SEP] identifier[portValue] operator[SEP] operator[SEP] identifier[File] identifier[parent] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[directory] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[File] identifier[f] operator[:] identifier[parent] operator[SEP] identifier[listFiles] operator[SEP] identifier[filter] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[f] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[t] operator[SEP] identifier[announce] operator[SEP] identifier[TrackedTorrent] operator[SEP] identifier[load] operator[SEP] identifier[f] operator[SEP] operator[SEP] operator[SEP] } identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[t] operator[SEP] identifier[getTrackedTorrents] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[t] operator[SEP] identifier[start] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[exit] operator[SEP] Other[2] operator[SEP] operator[SEP] } }
protected RawData __render(String template, Object... args) { if (null == template) return new RawData(""); return S.raw(__engine.sandbox().render(template, args)); }
class class_name[name] begin[{] method[__render, return_type[type[RawData]], modifier[protected], parameter[template, args]] begin[{] if[binary_operation[literal[null], ==, member[.template]]] begin[{] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RawData, sub_type=None))] else begin[{] None end[}] return[call[S.raw, parameter[call[__engine.sandbox, parameter[]]]]] end[}] END[}]
Keyword[protected] identifier[RawData] identifier[__render] operator[SEP] identifier[String] identifier[template] , identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[template] operator[SEP] Keyword[return] Keyword[new] identifier[RawData] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[S] operator[SEP] identifier[raw] operator[SEP] identifier[__engine] operator[SEP] identifier[sandbox] operator[SEP] operator[SEP] operator[SEP] identifier[render] operator[SEP] identifier[template] , identifier[args] operator[SEP] operator[SEP] operator[SEP] }
@Override public CreateBotVersionResult createBotVersion(CreateBotVersionRequest request) { request = beforeClientExecution(request); return executeCreateBotVersion(request); }
class class_name[name] begin[{] method[createBotVersion, return_type[type[CreateBotVersionResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeCreateBotVersion, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CreateBotVersionResult] identifier[createBotVersion] operator[SEP] identifier[CreateBotVersionRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeCreateBotVersion] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public void read(AttributeSet other) { for (Iterator<Attribute<?>> iterator = attributes.values().iterator(); iterator.hasNext();) { Attribute<Object> attribute = (Attribute<Object>) iterator.next(); Attribute<Object> a = other.attribute(attribute.name()); if (a.isModified()) { attribute.read(a); } } }
class class_name[name] begin[{] method[read, return_type[void], modifier[public], parameter[other]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Attribute, sub_type=None)), name=attribute)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Attribute, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None)], member=attribute, postfix_operators=[], prefix_operators=[], qualifier=other, selectors=[], type_arguments=None), name=a)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Attribute, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isModified, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=attributes, selectors=[MethodInvocation(arguments=[], member=iterator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=iterator)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Attribute, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[read] operator[SEP] identifier[AttributeSet] identifier[other] operator[SEP] { Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[Attribute] operator[<] operator[?] operator[>] operator[>] identifier[iterator] operator[=] identifier[attributes] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[Attribute] operator[<] identifier[Object] operator[>] identifier[attribute] operator[=] operator[SEP] identifier[Attribute] operator[<] identifier[Object] operator[>] operator[SEP] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[Attribute] operator[<] identifier[Object] operator[>] identifier[a] operator[=] identifier[other] operator[SEP] identifier[attribute] operator[SEP] identifier[attribute] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[isModified] operator[SEP] operator[SEP] operator[SEP] { identifier[attribute] operator[SEP] identifier[read] operator[SEP] identifier[a] operator[SEP] operator[SEP] } } }
public void setItems(java.util.Collection<Integration> items) { if (items == null) { this.items = null; return; } this.items = new java.util.ArrayList<Integration>(items); }
class class_name[name] begin[{] method[setItems, return_type[void], modifier[public], parameter[items]] begin[{] if[binary_operation[member[.items], ==, literal[null]]] begin[{] assign[THIS[member[None.items]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.items]], ClassCreator(arguments=[MemberReference(member=items, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integration, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setItems] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[Integration] operator[>] identifier[items] operator[SEP] { Keyword[if] operator[SEP] identifier[items] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[items] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[items] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[Integration] operator[>] operator[SEP] identifier[items] operator[SEP] operator[SEP] }
@CheckReturnValue public PermOverrideManager deny(Permission... permissions) { Checks.notNull(permissions, "Permissions"); return deny(Permission.getRaw(permissions)); }
class class_name[name] begin[{] method[deny, return_type[type[PermOverrideManager]], modifier[public], parameter[permissions]] begin[{] call[Checks.notNull, parameter[member[.permissions], literal["Permissions"]]] return[call[.deny, parameter[call[Permission.getRaw, parameter[member[.permissions]]]]]] end[}] END[}]
annotation[@] identifier[CheckReturnValue] Keyword[public] identifier[PermOverrideManager] identifier[deny] operator[SEP] identifier[Permission] operator[...] identifier[permissions] operator[SEP] { identifier[Checks] operator[SEP] identifier[notNull] operator[SEP] identifier[permissions] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[deny] operator[SEP] identifier[Permission] operator[SEP] identifier[getRaw] operator[SEP] identifier[permissions] operator[SEP] operator[SEP] operator[SEP] }
public boolean mergeCancellingPairs() { final Multimap<UUID, Item> cancellingPairPerInvoiceItemId = LinkedListMultimap.<UUID, Item>create(); for (final Item item : items) { final UUID invoiceItemId = (item.getAction() == ItemAction.ADD) ? item.getId() : item.getLinkedId(); cancellingPairPerInvoiceItemId.put(invoiceItemId, item); } for (final UUID invoiceItemId : cancellingPairPerInvoiceItemId.keySet()) { final Collection<Item> itemsToRemove = cancellingPairPerInvoiceItemId.get(invoiceItemId); Preconditions.checkState(itemsToRemove.size() <= 2, "Too many repairs for invoiceItemId='%s': %s", invoiceItemId, itemsToRemove); if (itemsToRemove.size() == 2) { for (final Item itemToRemove : itemsToRemove) { items.remove(itemToRemove); } } } return items.isEmpty(); }
class class_name[name] begin[{] method[mergeCancellingPairs, return_type[type[boolean]], modifier[public], parameter[]] begin[{] local_variable[type[Multimap], cancellingPairPerInvoiceItemId] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAction, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None), operandr=MemberReference(member=ADD, postfix_operators=[], prefix_operators=[], qualifier=ItemAction, selectors=[]), operator===), if_false=MethodInvocation(arguments=[], member=getLinkedId, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None)), name=invoiceItemId)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=UUID, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=invoiceItemId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=cancellingPairPerInvoiceItemId, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=items, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=item)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Item, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=invoiceItemId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=cancellingPairPerInvoiceItemId, selectors=[], type_arguments=None), name=itemsToRemove)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Item, sub_type=None))], dimensions=[], name=Collection, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=itemsToRemove, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=<=), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Too many repairs for invoiceItemId='%s': %s"), MemberReference(member=invoiceItemId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=itemsToRemove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkState, postfix_operators=[], prefix_operators=[], qualifier=Preconditions, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=itemsToRemove, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=itemToRemove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=items, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=itemsToRemove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=itemToRemove)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Item, sub_type=None))), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=cancellingPairPerInvoiceItemId, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=invoiceItemId)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=UUID, sub_type=None))), label=None) return[call[items.isEmpty, parameter[]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[mergeCancellingPairs] operator[SEP] operator[SEP] { Keyword[final] identifier[Multimap] operator[<] identifier[UUID] , identifier[Item] operator[>] identifier[cancellingPairPerInvoiceItemId] operator[=] identifier[LinkedListMultimap] operator[SEP] operator[<] identifier[UUID] , identifier[Item] operator[>] identifier[create] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Item] identifier[item] operator[:] identifier[items] operator[SEP] { Keyword[final] identifier[UUID] identifier[invoiceItemId] operator[=] operator[SEP] identifier[item] operator[SEP] identifier[getAction] operator[SEP] operator[SEP] operator[==] identifier[ItemAction] operator[SEP] identifier[ADD] operator[SEP] operator[?] identifier[item] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[:] identifier[item] operator[SEP] identifier[getLinkedId] operator[SEP] operator[SEP] operator[SEP] identifier[cancellingPairPerInvoiceItemId] operator[SEP] identifier[put] operator[SEP] identifier[invoiceItemId] , identifier[item] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[UUID] identifier[invoiceItemId] operator[:] identifier[cancellingPairPerInvoiceItemId] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[Collection] operator[<] identifier[Item] operator[>] identifier[itemsToRemove] operator[=] identifier[cancellingPairPerInvoiceItemId] operator[SEP] identifier[get] operator[SEP] identifier[invoiceItemId] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] identifier[itemsToRemove] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<=] Other[2] , literal[String] , identifier[invoiceItemId] , identifier[itemsToRemove] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[itemsToRemove] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[2] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[Item] identifier[itemToRemove] operator[:] identifier[itemsToRemove] operator[SEP] { identifier[items] operator[SEP] identifier[remove] operator[SEP] identifier[itemToRemove] operator[SEP] operator[SEP] } } } Keyword[return] identifier[items] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] }
public static void insertBand( GrayF64 input, int band , InterleavedF64 output) { final int numBands = output.numBands; for (int y = 0; y < input.height; y++) { int indexIn = input.getStartIndex() + y * input.getStride(); int indexOut = output.getStartIndex() + y * output.getStride() + band; int end = indexOut + output.width*numBands - band; for (; indexOut < end; indexOut += numBands , indexIn++ ) { output.data[indexOut] = input.data[indexIn]; } } }
class class_name[name] begin[{] method[insertBand, return_type[void], modifier[public static], parameter[input, band, output]] begin[{] local_variable[type[int], numBands] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStartIndex, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getStride, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operator=*), operator=+), name=indexIn)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStartIndex, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getStride, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), operator=*), operator=+), operandr=MemberReference(member=band, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=indexOut)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=indexOut, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[]), operandr=MemberReference(member=numBands, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+), operandr=MemberReference(member=band, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), name=end)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[ArraySelector(index=MemberReference(member=indexOut, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[ArraySelector(index=MemberReference(member=indexIn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=indexOut, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=None, update=[Assignment(expressionl=MemberReference(member=indexOut, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=numBands, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=indexIn, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=y)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=y, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[insertBand] operator[SEP] identifier[GrayF64] identifier[input] , Keyword[int] identifier[band] , identifier[InterleavedF64] identifier[output] operator[SEP] { Keyword[final] Keyword[int] identifier[numBands] operator[=] identifier[output] operator[SEP] identifier[numBands] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[y] operator[=] Other[0] operator[SEP] identifier[y] operator[<] identifier[input] operator[SEP] identifier[height] operator[SEP] identifier[y] operator[++] operator[SEP] { Keyword[int] identifier[indexIn] operator[=] identifier[input] operator[SEP] identifier[getStartIndex] operator[SEP] operator[SEP] operator[+] identifier[y] operator[*] identifier[input] operator[SEP] identifier[getStride] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[indexOut] operator[=] identifier[output] operator[SEP] identifier[getStartIndex] operator[SEP] operator[SEP] operator[+] identifier[y] operator[*] identifier[output] operator[SEP] identifier[getStride] operator[SEP] operator[SEP] operator[+] identifier[band] operator[SEP] Keyword[int] identifier[end] operator[=] identifier[indexOut] operator[+] identifier[output] operator[SEP] identifier[width] operator[*] identifier[numBands] operator[-] identifier[band] operator[SEP] Keyword[for] operator[SEP] operator[SEP] identifier[indexOut] operator[<] identifier[end] operator[SEP] identifier[indexOut] operator[+=] identifier[numBands] , identifier[indexIn] operator[++] operator[SEP] { identifier[output] operator[SEP] identifier[data] operator[SEP] identifier[indexOut] operator[SEP] operator[=] identifier[input] operator[SEP] identifier[data] operator[SEP] identifier[indexIn] operator[SEP] operator[SEP] } } }
@SuppressWarnings("unchecked") public static Subject getRunAsSubject() throws WSSecurityException { SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(GETRUNASSUBJECT_PERM); } Subject s = null; try { s = (Subject) java.security.AccessController.doPrivileged(getRunAsSubjectAction); } catch (PrivilegedActionException pae) { WSSecurityException e = (WSSecurityException) pae.getException(); throw e; } return s; }
class class_name[name] begin[{] method[getRunAsSubject, return_type[type[Subject]], modifier[public static], parameter[]] begin[{] local_variable[type[SecurityManager], sm] if[binary_operation[member[.sm], !=, literal[null]]] begin[{] call[sm.checkPermission, parameter[member[.GETRUNASSUBJECT_PERM]]] else begin[{] None end[}] local_variable[type[Subject], s] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=getRunAsSubjectAction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doPrivileged, postfix_operators=[], prefix_operators=[], qualifier=java.security.AccessController, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Subject, sub_type=None))), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getException, postfix_operators=[], prefix_operators=[], qualifier=pae, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=WSSecurityException, sub_type=None)), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WSSecurityException, sub_type=None)), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=pae, types=['PrivilegedActionException']))], finally_block=None, label=None, resources=None) return[member[.s]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[Subject] identifier[getRunAsSubject] operator[SEP] operator[SEP] Keyword[throws] identifier[WSSecurityException] { identifier[SecurityManager] identifier[sm] operator[=] identifier[System] operator[SEP] identifier[getSecurityManager] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sm] operator[!=] Other[null] operator[SEP] { identifier[sm] operator[SEP] identifier[checkPermission] operator[SEP] identifier[GETRUNASSUBJECT_PERM] operator[SEP] operator[SEP] } identifier[Subject] identifier[s] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[s] operator[=] operator[SEP] identifier[Subject] operator[SEP] identifier[java] operator[SEP] identifier[security] operator[SEP] identifier[AccessController] operator[SEP] identifier[doPrivileged] operator[SEP] identifier[getRunAsSubjectAction] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[PrivilegedActionException] identifier[pae] operator[SEP] { identifier[WSSecurityException] identifier[e] operator[=] operator[SEP] identifier[WSSecurityException] operator[SEP] identifier[pae] operator[SEP] identifier[getException] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } Keyword[return] identifier[s] operator[SEP] }
public void setWarning (float warnPercent, ResultListener<TimerView> warner) { // This warning hasn't triggered yet _warned = false; // Here are the details _warnPercent = warnPercent; _warner = warner; }
class class_name[name] begin[{] method[setWarning, return_type[void], modifier[public], parameter[warnPercent, warner]] begin[{] assign[member[._warned], literal[false]] assign[member[._warnPercent], member[.warnPercent]] assign[member[._warner], member[.warner]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setWarning] operator[SEP] Keyword[float] identifier[warnPercent] , identifier[ResultListener] operator[<] identifier[TimerView] operator[>] identifier[warner] operator[SEP] { identifier[_warned] operator[=] literal[boolean] operator[SEP] identifier[_warnPercent] operator[=] identifier[warnPercent] operator[SEP] identifier[_warner] operator[=] identifier[warner] operator[SEP] }
public Marshaller getMarshaller(T instance) throws JAXBException { JAXBContext context = JAXBContext.newInstance(instance.getClass()); Marshaller marshaller = context.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); return marshaller; }
class class_name[name] begin[{] method[getMarshaller, return_type[type[Marshaller]], modifier[public], parameter[instance]] begin[{] local_variable[type[JAXBContext], context] local_variable[type[Marshaller], marshaller] call[marshaller.setProperty, parameter[member[Marshaller.JAXB_FORMATTED_OUTPUT], literal[true]]] return[member[.marshaller]] end[}] END[}]
Keyword[public] identifier[Marshaller] identifier[getMarshaller] operator[SEP] identifier[T] identifier[instance] operator[SEP] Keyword[throws] identifier[JAXBException] { identifier[JAXBContext] identifier[context] operator[=] identifier[JAXBContext] operator[SEP] identifier[newInstance] operator[SEP] identifier[instance] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Marshaller] identifier[marshaller] operator[=] identifier[context] operator[SEP] identifier[createMarshaller] operator[SEP] operator[SEP] operator[SEP] identifier[marshaller] operator[SEP] identifier[setProperty] operator[SEP] identifier[Marshaller] operator[SEP] identifier[JAXB_FORMATTED_OUTPUT] , literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[marshaller] operator[SEP] }
public synchronized String start() { if (started) return null; // Create a processor for the specified jmf locator String result = createProcessor(); if (result != null) { started = false; } // Create an RTP session to transmit the output of the // processor to the specified IP address and port no. result = createTransmitter(); if (result != null) { processor.close(); processor = null; started = false; } else { started = true; } // Start the transmission processor.start(); return null; }
class class_name[name] begin[{] method[start, return_type[type[String]], modifier[synchronized public], parameter[]] begin[{] if[member[.started]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], result] if[binary_operation[member[.result], !=, literal[null]]] begin[{] assign[member[.started], literal[false]] else begin[{] None end[}] assign[member[.result], call[.createTransmitter, parameter[]]] if[binary_operation[member[.result], !=, literal[null]]] begin[{] call[processor.close, parameter[]] assign[member[.processor], literal[null]] assign[member[.started], literal[false]] else begin[{] assign[member[.started], literal[true]] end[}] call[processor.start, parameter[]] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[synchronized] identifier[String] identifier[start] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[started] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[String] identifier[result] operator[=] identifier[createProcessor] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[null] operator[SEP] { identifier[started] operator[=] literal[boolean] operator[SEP] } identifier[result] operator[=] identifier[createTransmitter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[null] operator[SEP] { identifier[processor] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[processor] operator[=] Other[null] operator[SEP] identifier[started] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[started] operator[=] literal[boolean] operator[SEP] } identifier[processor] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
public Void visitScope(Scope scope) { messages.add(new Message(PrettyPrinter.format("Explicit scope unsupported: key=%s scope=%s", targetKey, scope))); return null; }
class class_name[name] begin[{] method[visitScope, return_type[type[Void]], modifier[public], parameter[scope]] begin[{] call[messages.add, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Explicit scope unsupported: key=%s scope=%s"), MemberReference(member=targetKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=scope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=PrettyPrinter, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Message, sub_type=None))]] return[literal[null]] end[}] END[}]
Keyword[public] identifier[Void] identifier[visitScope] operator[SEP] identifier[Scope] identifier[scope] operator[SEP] { identifier[messages] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Message] operator[SEP] identifier[PrettyPrinter] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[targetKey] , identifier[scope] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
private static Class<?> loadPrimitiveType(String fullName, ClassNotFoundException ex) throws ClassNotFoundException { if (fullName.equals("int")) { return int.class; } else if (fullName.equals("long")) { return long.class; } else if (fullName.equals("double")) { return double.class; } else if (fullName.equals("boolean")) { return boolean.class; } else if (fullName.equals("short")) { return short.class; } else if (fullName.equals("byte")) { return byte.class; } else if (fullName.equals("char")) { return char.class; } else if (fullName.equals("float")) { return float.class; } else if (fullName.equals("void")) { return void.class; } throw ex; }
class class_name[name] begin[{] method[loadPrimitiveType, return_type[type[Class]], modifier[private static], parameter[fullName, ex]] begin[{] if[call[fullName.equals, parameter[literal["int"]]]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=int))] else begin[{] if[call[fullName.equals, parameter[literal["long"]]]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=long))] else begin[{] if[call[fullName.equals, parameter[literal["double"]]]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=double))] else begin[{] if[call[fullName.equals, parameter[literal["boolean"]]]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=boolean))] else begin[{] if[call[fullName.equals, parameter[literal["short"]]]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=short))] else begin[{] if[call[fullName.equals, parameter[literal["byte"]]]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=byte))] else begin[{] if[call[fullName.equals, parameter[literal["char"]]]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=char))] else begin[{] if[call[fullName.equals, parameter[literal["float"]]]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=float))] else begin[{] if[call[fullName.equals, parameter[literal["void"]]]] begin[{] return[VoidClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=None)] else begin[{] None end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] ThrowStatement(expression=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[private] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[loadPrimitiveType] operator[SEP] identifier[String] identifier[fullName] , identifier[ClassNotFoundException] identifier[ex] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] { Keyword[if] operator[SEP] identifier[fullName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[int] operator[SEP] Keyword[class] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fullName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[long] operator[SEP] Keyword[class] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fullName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[double] operator[SEP] Keyword[class] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fullName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[boolean] operator[SEP] Keyword[class] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fullName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[short] operator[SEP] Keyword[class] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fullName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[byte] operator[SEP] Keyword[class] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fullName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[char] operator[SEP] Keyword[class] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fullName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[float] operator[SEP] Keyword[class] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fullName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[void] operator[SEP] Keyword[class] operator[SEP] } Keyword[throw] identifier[ex] operator[SEP] }
protected void resetLocalAddress(final Handler<AsyncResult<Boolean>> doneHandler) { localAddress = null; lastReset = System.currentTimeMillis(); clusterLocator.locateCluster(address, new Handler<AsyncResult<String>>() { @Override public void handle(AsyncResult<String> result) { if (result.succeeded() && result.result() != null) { localAddress = result.result(); new DefaultFutureResult<Boolean>(true).setHandler(doneHandler); } else { new DefaultFutureResult<Boolean>(false).setHandler(doneHandler); } } }); }
class class_name[name] begin[{] method[resetLocalAddress, return_type[void], modifier[protected], parameter[doneHandler]] begin[{] assign[member[.localAddress], literal[null]] assign[member[.lastReset], call[System.currentTimeMillis, parameter[]]] call[clusterLocator.locateCluster, parameter[member[.address], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=succeeded, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=result, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=doneHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=DefaultFutureResult, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=localAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=result, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=doneHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=DefaultFutureResult, sub_type=None)), label=None)]))], documentation=None, modifiers={'public'}, name=handle, parameters=[FormalParameter(annotations=[], modifiers=set(), name=result, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=AsyncResult, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=AsyncResult, sub_type=None))], dimensions=None, name=Handler, sub_type=None))]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[resetLocalAddress] operator[SEP] Keyword[final] identifier[Handler] operator[<] identifier[AsyncResult] operator[<] identifier[Boolean] operator[>] operator[>] identifier[doneHandler] operator[SEP] { identifier[localAddress] operator[=] Other[null] operator[SEP] identifier[lastReset] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[clusterLocator] operator[SEP] identifier[locateCluster] operator[SEP] identifier[address] , Keyword[new] identifier[Handler] operator[<] identifier[AsyncResult] operator[<] identifier[String] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handle] operator[SEP] identifier[AsyncResult] operator[<] identifier[String] operator[>] identifier[result] operator[SEP] { Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[succeeded] operator[SEP] operator[SEP] operator[&&] identifier[result] operator[SEP] identifier[result] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[localAddress] operator[=] identifier[result] operator[SEP] identifier[result] operator[SEP] operator[SEP] operator[SEP] Keyword[new] identifier[DefaultFutureResult] operator[<] identifier[Boolean] operator[>] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[setHandler] operator[SEP] identifier[doneHandler] operator[SEP] operator[SEP] } Keyword[else] { Keyword[new] identifier[DefaultFutureResult] operator[<] identifier[Boolean] operator[>] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[setHandler] operator[SEP] identifier[doneHandler] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
public static int cudnnGetActivationDescriptor( cudnnActivationDescriptor activationDesc, int[] mode, int[] reluNanOpt, double[] coef)/** ceiling for clipped RELU, alpha for ELU */ { return checkResult(cudnnGetActivationDescriptorNative(activationDesc, mode, reluNanOpt, coef)); }
class class_name[name] begin[{] method[cudnnGetActivationDescriptor, return_type[type[int]], modifier[public static], parameter[activationDesc, mode, reluNanOpt, coef]] begin[{] return[call[.checkResult, parameter[call[.cudnnGetActivationDescriptorNative, parameter[member[.activationDesc], member[.mode], member[.reluNanOpt], member[.coef]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[cudnnGetActivationDescriptor] operator[SEP] identifier[cudnnActivationDescriptor] identifier[activationDesc] , Keyword[int] operator[SEP] operator[SEP] identifier[mode] , Keyword[int] operator[SEP] operator[SEP] identifier[reluNanOpt] , Keyword[double] operator[SEP] operator[SEP] identifier[coef] operator[SEP] { Keyword[return] identifier[checkResult] operator[SEP] identifier[cudnnGetActivationDescriptorNative] operator[SEP] identifier[activationDesc] , identifier[mode] , identifier[reluNanOpt] , identifier[coef] operator[SEP] operator[SEP] operator[SEP] }
protected static void binaryToDef(GrayU8 binary , short[] desc ) { for (int i = 0; i < binary.data.length; i+=16) { int value = 0; for (int j = 0; j < 16; j++) { value |= binary.data[i+j] << j; } desc[i/16] = (short)value; } }
class class_name[name] begin[{] method[binaryToDef, return_type[void], modifier[static protected], parameter[binary, desc]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=value)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=|=, value=BinaryOperation(operandl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=binary, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<<)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), 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), StatementExpression(expression=Assignment(expressionl=MemberReference(member=desc, 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=16), operator=/))]), type==, value=Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=short))), 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=binary.data, 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=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16))]), label=None) end[}] END[}]
Keyword[protected] Keyword[static] Keyword[void] identifier[binaryToDef] operator[SEP] identifier[GrayU8] identifier[binary] , Keyword[short] operator[SEP] operator[SEP] identifier[desc] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[binary] operator[SEP] identifier[data] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[+=] Other[16] operator[SEP] { Keyword[int] identifier[value] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] Other[16] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[value] operator[|=] identifier[binary] operator[SEP] identifier[data] operator[SEP] identifier[i] operator[+] identifier[j] operator[SEP] operator[<<] identifier[j] operator[SEP] } identifier[desc] operator[SEP] identifier[i] operator[/] Other[16] operator[SEP] operator[=] operator[SEP] Keyword[short] operator[SEP] identifier[value] operator[SEP] } }
private Collection<String> getRolesForSpecialSubject(String resourceName, String specialSubject) { int found = 0; Collection<String> roles = null; FeatureAuthorizationTableService featureAuthzTableSvc = featureAuthzTableServiceRef.getService(); String featureAuthzRoleHeaderValue = null; if (featureAuthzTableSvc != null) { featureAuthzRoleHeaderValue = featureAuthzTableSvc.getFeatureAuthzRoleHeaderValue(); } if (featureAuthzRoleHeaderValue != null && !featureAuthzRoleHeaderValue.equals(MGMT_AUTHZ_ROLES)) { roles = featureAuthzTableSvc.getRolesForSpecialSubject(resourceName, specialSubject); } else { Iterator<AuthorizationTableService> itr = authorizationTables.getServices(); while (itr.hasNext()) { AuthorizationTableService authzTableSvc = itr.next(); Collection<String> rolesFound = authzTableSvc.getRolesForSpecialSubject(resourceName, specialSubject); if (rolesFound != null) { roles = rolesFound; found++; } } // We must find one, and only one, Collection of roles if (found > 1) { Tr.error(tc, "AUTHZ_MULTIPLE_RESOURCES_WITH_SAME_NAME", resourceName); roles = null; } } return roles; }
class class_name[name] begin[{] method[getRolesForSpecialSubject, return_type[type[Collection]], modifier[private], parameter[resourceName, specialSubject]] begin[{] local_variable[type[int], found] local_variable[type[Collection], roles] local_variable[type[FeatureAuthorizationTableService], featureAuthzTableSvc] local_variable[type[String], featureAuthzRoleHeaderValue] if[binary_operation[member[.featureAuthzTableSvc], !=, literal[null]]] begin[{] assign[member[.featureAuthzRoleHeaderValue], call[featureAuthzTableSvc.getFeatureAuthzRoleHeaderValue, parameter[]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.featureAuthzRoleHeaderValue], !=, literal[null]], &&, call[featureAuthzRoleHeaderValue.equals, parameter[member[.MGMT_AUTHZ_ROLES]]]]] begin[{] assign[member[.roles], call[featureAuthzTableSvc.getRolesForSpecialSubject, parameter[member[.resourceName], member[.specialSubject]]]] else begin[{] local_variable[type[Iterator], itr] while[call[itr.hasNext, parameter[]]] begin[{] local_variable[type[AuthorizationTableService], authzTableSvc] local_variable[type[Collection], rolesFound] if[binary_operation[member[.rolesFound], !=, literal[null]]] begin[{] assign[member[.roles], member[.rolesFound]] member[.found] else begin[{] None end[}] end[}] if[binary_operation[member[.found], >, literal[1]]] begin[{] call[Tr.error, parameter[member[.tc], literal["AUTHZ_MULTIPLE_RESOURCES_WITH_SAME_NAME"], member[.resourceName]]] assign[member[.roles], literal[null]] else begin[{] None end[}] end[}] return[member[.roles]] end[}] END[}]
Keyword[private] identifier[Collection] operator[<] identifier[String] operator[>] identifier[getRolesForSpecialSubject] operator[SEP] identifier[String] identifier[resourceName] , identifier[String] identifier[specialSubject] operator[SEP] { Keyword[int] identifier[found] operator[=] Other[0] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[roles] operator[=] Other[null] operator[SEP] identifier[FeatureAuthorizationTableService] identifier[featureAuthzTableSvc] operator[=] identifier[featureAuthzTableServiceRef] operator[SEP] identifier[getService] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[featureAuthzRoleHeaderValue] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[featureAuthzTableSvc] operator[!=] Other[null] operator[SEP] { identifier[featureAuthzRoleHeaderValue] operator[=] identifier[featureAuthzTableSvc] operator[SEP] identifier[getFeatureAuthzRoleHeaderValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[featureAuthzRoleHeaderValue] operator[!=] Other[null] operator[&&] operator[!] identifier[featureAuthzRoleHeaderValue] operator[SEP] identifier[equals] operator[SEP] identifier[MGMT_AUTHZ_ROLES] operator[SEP] operator[SEP] { identifier[roles] operator[=] identifier[featureAuthzTableSvc] operator[SEP] identifier[getRolesForSpecialSubject] operator[SEP] identifier[resourceName] , identifier[specialSubject] operator[SEP] operator[SEP] } Keyword[else] { identifier[Iterator] operator[<] identifier[AuthorizationTableService] operator[>] identifier[itr] operator[=] identifier[authorizationTables] operator[SEP] identifier[getServices] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[itr] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[AuthorizationTableService] identifier[authzTableSvc] operator[=] identifier[itr] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[rolesFound] operator[=] identifier[authzTableSvc] operator[SEP] identifier[getRolesForSpecialSubject] operator[SEP] identifier[resourceName] , identifier[specialSubject] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rolesFound] operator[!=] Other[null] operator[SEP] { identifier[roles] operator[=] identifier[rolesFound] operator[SEP] identifier[found] operator[++] operator[SEP] } } Keyword[if] operator[SEP] identifier[found] operator[>] Other[1] operator[SEP] { identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[resourceName] operator[SEP] operator[SEP] identifier[roles] operator[=] Other[null] operator[SEP] } } Keyword[return] identifier[roles] operator[SEP] }
private void getSheetAsFile(long id, PaperSize paperSize, OutputStream outputStream, String contentType) throws SmartsheetException { Util.throwIfNull(outputStream, contentType); String path = "sheets/" + id; if (paperSize != null) { path += "?paperSize=" + paperSize; } HttpRequest request; request = createHttpRequest(this.getSmartsheet().getBaseURI().resolve(path), HttpMethod.GET); request.getHeaders().put("Accept", contentType); com.smartsheet.api.internal.http.HttpResponse response = getSmartsheet().getHttpClient().request(request); switch (response.getStatusCode()) { case 200: try { copyStream(response.getEntity().getContent(), outputStream); } catch (IOException e) { throw new SmartsheetException(e); } break; default: handleError(response); } getSmartsheet().getHttpClient().releaseConnection(); }
class class_name[name] begin[{] method[getSheetAsFile, return_type[void], modifier[private], parameter[id, paperSize, outputStream, contentType]] begin[{] call[Util.throwIfNull, parameter[member[.outputStream], member[.contentType]]] local_variable[type[String], path] if[binary_operation[member[.paperSize], !=, literal[null]]] begin[{] assign[member[.path], binary_operation[literal["?paperSize="], +, member[.paperSize]]] else begin[{] None end[}] local_variable[type[HttpRequest], request] assign[member[.request], call[.createHttpRequest, parameter[THIS[call[None.getSmartsheet, parameter[]]call[None.getBaseURI, parameter[]]call[None.resolve, parameter[member[.path]]]], member[HttpMethod.GET]]]] call[request.getHeaders, parameter[]] local_variable[type[com], response] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=200)], statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEntity, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[MethodInvocation(arguments=[], member=getContent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=outputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copyStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SmartsheetException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], expression=MethodInvocation(arguments=[], member=getStatusCode, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), label=None) call[.getSmartsheet, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[getSheetAsFile] operator[SEP] Keyword[long] identifier[id] , identifier[PaperSize] identifier[paperSize] , identifier[OutputStream] identifier[outputStream] , identifier[String] identifier[contentType] operator[SEP] Keyword[throws] identifier[SmartsheetException] { identifier[Util] operator[SEP] identifier[throwIfNull] operator[SEP] identifier[outputStream] , identifier[contentType] operator[SEP] operator[SEP] identifier[String] identifier[path] operator[=] literal[String] operator[+] identifier[id] operator[SEP] Keyword[if] operator[SEP] identifier[paperSize] operator[!=] Other[null] operator[SEP] { identifier[path] operator[+=] literal[String] operator[+] identifier[paperSize] operator[SEP] } identifier[HttpRequest] identifier[request] operator[SEP] identifier[request] operator[=] identifier[createHttpRequest] operator[SEP] Keyword[this] operator[SEP] identifier[getSmartsheet] operator[SEP] operator[SEP] operator[SEP] identifier[getBaseURI] operator[SEP] operator[SEP] operator[SEP] identifier[resolve] operator[SEP] identifier[path] operator[SEP] , identifier[HttpMethod] operator[SEP] identifier[GET] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[getHeaders] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[contentType] operator[SEP] operator[SEP] identifier[com] operator[SEP] identifier[smartsheet] operator[SEP] identifier[api] operator[SEP] identifier[internal] operator[SEP] identifier[http] operator[SEP] identifier[HttpResponse] identifier[response] operator[=] identifier[getSmartsheet] operator[SEP] operator[SEP] operator[SEP] identifier[getHttpClient] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[response] operator[SEP] identifier[getStatusCode] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] Other[200] operator[:] Keyword[try] { identifier[copyStream] operator[SEP] identifier[response] operator[SEP] identifier[getEntity] operator[SEP] operator[SEP] operator[SEP] identifier[getContent] operator[SEP] operator[SEP] , identifier[outputStream] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SmartsheetException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[handleError] operator[SEP] identifier[response] operator[SEP] operator[SEP] } identifier[getSmartsheet] operator[SEP] operator[SEP] operator[SEP] identifier[getHttpClient] operator[SEP] operator[SEP] operator[SEP] identifier[releaseConnection] operator[SEP] operator[SEP] operator[SEP] }
private void primUpdateMembers(boolean renewLock) throws GroupsException { getLockableGroupService().updateGroupMembers(this, renewLock); clearPendingUpdates(); this.invalidateInParentGroupsCache(Collections.singleton((IGroupMember) this)); }
class class_name[name] begin[{] method[primUpdateMembers, return_type[void], modifier[private], parameter[renewLock]] begin[{] call[.getLockableGroupService, parameter[]] call[.clearPendingUpdates, parameter[]] THIS[call[None.invalidateInParentGroupsCache, parameter[call[Collections.singleton, parameter[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=IGroupMember, sub_type=None))]]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[primUpdateMembers] operator[SEP] Keyword[boolean] identifier[renewLock] operator[SEP] Keyword[throws] identifier[GroupsException] { identifier[getLockableGroupService] operator[SEP] operator[SEP] operator[SEP] identifier[updateGroupMembers] operator[SEP] Keyword[this] , identifier[renewLock] operator[SEP] operator[SEP] identifier[clearPendingUpdates] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[invalidateInParentGroupsCache] operator[SEP] identifier[Collections] operator[SEP] identifier[singleton] operator[SEP] operator[SEP] identifier[IGroupMember] operator[SEP] Keyword[this] operator[SEP] operator[SEP] operator[SEP] }
public float getPixel(int x, int y) { float pixel = -1; if (rasters == null) { readPixels(); } if (rasters != null) { pixel = rasters.getFirstPixelSample(x, y).floatValue(); } else { throw new GeoPackageException("Could not retrieve pixel value"); } return pixel; }
class class_name[name] begin[{] method[getPixel, return_type[type[float]], modifier[public], parameter[x, y]] begin[{] local_variable[type[float], pixel] if[binary_operation[member[.rasters], ==, literal[null]]] begin[{] call[.readPixels, parameter[]] else begin[{] None end[}] if[binary_operation[member[.rasters], !=, literal[null]]] begin[{] assign[member[.pixel], call[rasters.getFirstPixelSample, parameter[member[.x], member[.y]]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not retrieve pixel value")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GeoPackageException, sub_type=None)), label=None) end[}] return[member[.pixel]] end[}] END[}]
Keyword[public] Keyword[float] identifier[getPixel] operator[SEP] Keyword[int] identifier[x] , Keyword[int] identifier[y] operator[SEP] { Keyword[float] identifier[pixel] operator[=] operator[-] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[rasters] operator[==] Other[null] operator[SEP] { identifier[readPixels] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[rasters] operator[!=] Other[null] operator[SEP] { identifier[pixel] operator[=] identifier[rasters] operator[SEP] identifier[getFirstPixelSample] operator[SEP] identifier[x] , identifier[y] operator[SEP] operator[SEP] identifier[floatValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[GeoPackageException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[pixel] operator[SEP] }
private static void extractPhotoshopData(@NotNull final Metadata metadata, @NotNull SequentialReader reader) throws IOException { byte[] buffer = decodeHexCommentBlock(reader); if (buffer != null) new PhotoshopReader().extract(new SequentialByteArrayReader(buffer), buffer.length, metadata); }
class class_name[name] begin[{] method[extractPhotoshopData, return_type[void], modifier[private static], parameter[metadata, reader]] begin[{] local_variable[type[byte], buffer] if[binary_operation[member[.buffer], !=, literal[null]]] begin[{] ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=buffer, 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=SequentialByteArrayReader, sub_type=None)), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=buffer, selectors=[]), MemberReference(member=metadata, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extract, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=PhotoshopReader, sub_type=None)) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[extractPhotoshopData] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[Metadata] identifier[metadata] , annotation[@] identifier[NotNull] identifier[SequentialReader] identifier[reader] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] operator[=] identifier[decodeHexCommentBlock] operator[SEP] identifier[reader] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[buffer] operator[!=] Other[null] operator[SEP] Keyword[new] identifier[PhotoshopReader] operator[SEP] operator[SEP] operator[SEP] identifier[extract] operator[SEP] Keyword[new] identifier[SequentialByteArrayReader] operator[SEP] identifier[buffer] operator[SEP] , identifier[buffer] operator[SEP] identifier[length] , identifier[metadata] operator[SEP] operator[SEP] }
public static <T> void forEach(final Iterable<T> iterable, final Consumer<? super T> consumer) { checkNotNull(iterable, "forEach must have a valid iterable"); checkNotNull(consumer, "forEach must have a valid consumer"); for (T t : iterable) { consumer.accept(t); } }
class class_name[name] begin[{] method[forEach, return_type[void], modifier[public static], parameter[iterable, consumer]] begin[{] call[.checkNotNull, parameter[member[.iterable], literal["forEach must have a valid iterable"]]] call[.checkNotNull, parameter[member[.consumer], literal["forEach must have a valid consumer"]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accept, postfix_operators=[], prefix_operators=[], qualifier=consumer, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=iterable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=t)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[void] identifier[forEach] operator[SEP] Keyword[final] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[iterable] , Keyword[final] identifier[Consumer] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[consumer] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[iterable] , literal[String] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[consumer] , literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[T] identifier[t] operator[:] identifier[iterable] operator[SEP] { identifier[consumer] operator[SEP] identifier[accept] operator[SEP] identifier[t] operator[SEP] operator[SEP] } }
@Override public void onManagerWarning(String warning, Exception cause) { if (warning != null) { System.err.println(DEBUG_PREFIX + "Simon warning: " + warning); } if (cause != null) { System.err.print(DEBUG_PREFIX); cause.printStackTrace(); } }
class class_name[name] begin[{] method[onManagerWarning, return_type[void], modifier[public], parameter[warning, cause]] begin[{] if[binary_operation[member[.warning], !=, literal[null]]] begin[{] call[System.err.println, parameter[binary_operation[binary_operation[member[.DEBUG_PREFIX], +, literal["Simon warning: "]], +, member[.warning]]]] else begin[{] None end[}] if[binary_operation[member[.cause], !=, literal[null]]] begin[{] call[System.err.print, parameter[member[.DEBUG_PREFIX]]] call[cause.printStackTrace, parameter[]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onManagerWarning] operator[SEP] identifier[String] identifier[warning] , identifier[Exception] identifier[cause] operator[SEP] { Keyword[if] operator[SEP] identifier[warning] operator[!=] Other[null] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] identifier[DEBUG_PREFIX] operator[+] literal[String] operator[+] identifier[warning] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[cause] operator[!=] Other[null] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[print] operator[SEP] identifier[DEBUG_PREFIX] operator[SEP] operator[SEP] identifier[cause] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } }
@Deprecated public boolean setAutoPostPreferences(SocialNetwork...networks) { boolean tw = isAutoPostToTwitter(); boolean fb = isAutoPostToFacebook(); setAutoPostToFacebook(false); setAutoPostToTwitter(false); if(networks != null) { for (SocialNetwork network : networks) { if(network.equals(SocialNetwork.FACEBOOK)) { setAutoPostToFacebook(true); } else if(network.equals(SocialNetwork.TWITTER)) { setAutoPostToTwitter(true); } } } return tw != isAutoPostToTwitter() || fb != isAutoPostToFacebook(); }
class class_name[name] begin[{] method[setAutoPostPreferences, return_type[type[boolean]], modifier[public], parameter[networks]] begin[{] local_variable[type[boolean], tw] local_variable[type[boolean], fb] call[.setAutoPostToFacebook, parameter[literal[false]]] call[.setAutoPostToTwitter, parameter[literal[false]]] if[binary_operation[member[.networks], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=FACEBOOK, postfix_operators=[], prefix_operators=[], qualifier=SocialNetwork, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=network, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=TWITTER, postfix_operators=[], prefix_operators=[], qualifier=SocialNetwork, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=network, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setAutoPostToTwitter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setAutoPostToFacebook, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=networks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=network)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SocialNetwork, sub_type=None))), label=None) else begin[{] None end[}] return[binary_operation[binary_operation[member[.tw], !=, call[.isAutoPostToTwitter, parameter[]]], ||, binary_operation[member[.fb], !=, call[.isAutoPostToFacebook, parameter[]]]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[boolean] identifier[setAutoPostPreferences] operator[SEP] identifier[SocialNetwork] operator[...] identifier[networks] operator[SEP] { Keyword[boolean] identifier[tw] operator[=] identifier[isAutoPostToTwitter] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[fb] operator[=] identifier[isAutoPostToFacebook] operator[SEP] operator[SEP] operator[SEP] identifier[setAutoPostToFacebook] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[setAutoPostToTwitter] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[networks] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[SocialNetwork] identifier[network] operator[:] identifier[networks] operator[SEP] { Keyword[if] operator[SEP] identifier[network] operator[SEP] identifier[equals] operator[SEP] identifier[SocialNetwork] operator[SEP] identifier[FACEBOOK] operator[SEP] operator[SEP] { identifier[setAutoPostToFacebook] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[network] operator[SEP] identifier[equals] operator[SEP] identifier[SocialNetwork] operator[SEP] identifier[TWITTER] operator[SEP] operator[SEP] { identifier[setAutoPostToTwitter] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } } } Keyword[return] identifier[tw] operator[!=] identifier[isAutoPostToTwitter] operator[SEP] operator[SEP] operator[||] identifier[fb] operator[!=] identifier[isAutoPostToFacebook] operator[SEP] operator[SEP] operator[SEP] }
protected static void writeList(Output out, List<?> list) { if (!list.isEmpty()) { int size = list.size(); // if its a small list, write it as an array if (size < 100) { out.writeArray(list); return; } // else we should check for lots of null values, // if there are over 80% then its probably best to do it as a map int nullCount = 0; for (int i = 0; i < size; i++) { if (list.get(i) == null) { nullCount++; } } if (nullCount > (size * 0.8)) { out.writeMap(list); } else { out.writeArray(list); } } else { out.writeArray(new Object[] {}); } }
class class_name[name] begin[{] method[writeList, return_type[void], modifier[static protected], parameter[out, list]] begin[{] if[call[list.isEmpty, parameter[]]] begin[{] local_variable[type[int], size] if[binary_operation[member[.size], <, literal[100]]] begin[{] call[out.writeArray, parameter[member[.list]]] return[None] else begin[{] None end[}] local_variable[type[int], nullCount] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=nullCount, 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=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[member[.nullCount], >, binary_operation[member[.size], *, literal[0.8]]]] begin[{] call[out.writeMap, parameter[member[.list]]] else begin[{] call[out.writeArray, parameter[member[.list]]] end[}] else begin[{] call[out.writeArray, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] end[}] end[}] END[}]
Keyword[protected] Keyword[static] Keyword[void] identifier[writeList] operator[SEP] identifier[Output] identifier[out] , identifier[List] operator[<] operator[?] operator[>] identifier[list] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[list] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[size] operator[=] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[size] operator[<] Other[100] operator[SEP] { identifier[out] operator[SEP] identifier[writeArray] operator[SEP] identifier[list] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[int] identifier[nullCount] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[size] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[list] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[nullCount] operator[++] operator[SEP] } } Keyword[if] operator[SEP] identifier[nullCount] operator[>] operator[SEP] identifier[size] operator[*] literal[Float] operator[SEP] operator[SEP] { identifier[out] operator[SEP] identifier[writeMap] operator[SEP] identifier[list] operator[SEP] operator[SEP] } Keyword[else] { identifier[out] operator[SEP] identifier[writeArray] operator[SEP] identifier[list] operator[SEP] operator[SEP] } } Keyword[else] { identifier[out] operator[SEP] identifier[writeArray] operator[SEP] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { } operator[SEP] operator[SEP] } }
static void modifiersToString(final int modifiers, final StringBuilder buf) { if ((modifiers & Modifier.FINAL) != 0) { buf.append("final "); } if ((modifiers & 0x1000) != 0) { buf.append("synthetic "); } if ((modifiers & 0x8000) != 0) { buf.append("mandated "); } }
class class_name[name] begin[{] method[modifiersToString, return_type[void], modifier[static], parameter[modifiers, buf]] begin[{] if[binary_operation[binary_operation[member[.modifiers], &, member[Modifier.FINAL]], !=, literal[0]]] begin[{] call[buf.append, parameter[literal["final "]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.modifiers], &, literal[0x1000]], !=, literal[0]]] begin[{] call[buf.append, parameter[literal["synthetic "]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.modifiers], &, literal[0x8000]], !=, literal[0]]] begin[{] call[buf.append, parameter[literal["mandated "]]] else begin[{] None end[}] end[}] END[}]
Keyword[static] Keyword[void] identifier[modifiersToString] operator[SEP] Keyword[final] Keyword[int] identifier[modifiers] , Keyword[final] identifier[StringBuilder] identifier[buf] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[modifiers] operator[&] identifier[Modifier] operator[SEP] identifier[FINAL] operator[SEP] operator[!=] Other[0] operator[SEP] { identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[modifiers] operator[&] literal[Integer] operator[SEP] operator[!=] Other[0] operator[SEP] { identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[modifiers] operator[&] literal[Integer] operator[SEP] operator[!=] Other[0] operator[SEP] { identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
public FaunusPipeline linkIn(final String label, final String step, final String mergeWeightKey) { return this.link(IN, label, step, mergeWeightKey); }
class class_name[name] begin[{] method[linkIn, return_type[type[FaunusPipeline]], modifier[public], parameter[label, step, mergeWeightKey]] begin[{] return[THIS[call[None.link, parameter[member[.IN], member[.label], member[.step], member[.mergeWeightKey]]]]] end[}] END[}]
Keyword[public] identifier[FaunusPipeline] identifier[linkIn] operator[SEP] Keyword[final] identifier[String] identifier[label] , Keyword[final] identifier[String] identifier[step] , Keyword[final] identifier[String] identifier[mergeWeightKey] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] identifier[link] operator[SEP] identifier[IN] , identifier[label] , identifier[step] , identifier[mergeWeightKey] operator[SEP] operator[SEP] }
@Override public String getLocalName(int index) { if (index < 0 || index >= attributesList.size()) { return null; } Attribute attr = attributesList.get(index); // FIXME attr.localName is sometimes null, why? if (namespaces && attr.localName == null) { // XXX fix this here for now int ci = attr.name.indexOf(':'); attr.localName = (ci == -1) ? attr.name : attr.name.substring(ci + 1); } return (attr.localName == null) ? "" : attr.localName; }
class class_name[name] begin[{] method[getLocalName, return_type[type[String]], modifier[public], parameter[index]] begin[{] if[binary_operation[binary_operation[member[.index], <, literal[0]], ||, binary_operation[member[.index], >=, call[attributesList.size, parameter[]]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Attribute], attr] if[binary_operation[member[.namespaces], &&, binary_operation[member[attr.localName], ==, literal[null]]]] begin[{] local_variable[type[int], ci] assign[member[attr.localName], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=ci, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=ci, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=attr.name, selectors=[], type_arguments=None), if_true=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=attr, selectors=[]))] else begin[{] None end[}] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=localName, postfix_operators=[], prefix_operators=[], qualifier=attr, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=localName, postfix_operators=[], prefix_operators=[], qualifier=attr, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getLocalName] operator[SEP] Keyword[int] identifier[index] operator[SEP] { Keyword[if] operator[SEP] identifier[index] operator[<] Other[0] operator[||] identifier[index] operator[>=] identifier[attributesList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[Attribute] identifier[attr] operator[=] identifier[attributesList] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[namespaces] operator[&&] identifier[attr] operator[SEP] identifier[localName] operator[==] Other[null] operator[SEP] { Keyword[int] identifier[ci] operator[=] identifier[attr] operator[SEP] identifier[name] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[attr] operator[SEP] identifier[localName] operator[=] operator[SEP] identifier[ci] operator[==] operator[-] Other[1] operator[SEP] operator[?] identifier[attr] operator[SEP] identifier[name] operator[:] identifier[attr] operator[SEP] identifier[name] operator[SEP] identifier[substring] operator[SEP] identifier[ci] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[attr] operator[SEP] identifier[localName] operator[==] Other[null] operator[SEP] operator[?] literal[String] operator[:] identifier[attr] operator[SEP] identifier[localName] operator[SEP] }
private void writeImport(SymbolTable symTab) { assert symTab.isSharedTable(); final int originalOffset = myBuffer.length - myOffset; // Write the maxId as int int maxId = symTab.getMaxId(); if (maxId == 0) { writeByte((byte) TYPE_POS_INT); } else { writeUInt(maxId); writePrefix(TYPE_POS_INT, myBuffer.length - myOffset - originalOffset); } // Write the "max_id" field name writeByte((byte) (0x80 | MAX_ID_SID)); final int maxIdOffset = myBuffer.length - myOffset; // Write the version as int (version will be at least one) int version = symTab.getVersion(); writeUInt(version); writePrefix(TYPE_POS_INT, myBuffer.length - myOffset - maxIdOffset); // Write the "version" field name writeByte((byte) (0x80 | VERSION_SID)); // Write the name as string String name = symTab.getName(); writeIonStringContent(name); // Write the "name" field name writeByte((byte) (0x80 | NAME_SID)); // Write the struct prefix writePrefix(TYPE_STRUCT, myBuffer.length - myOffset - originalOffset); }
class class_name[name] begin[{] method[writeImport, return_type[void], modifier[private], parameter[symTab]] begin[{] AssertStatement(condition=MethodInvocation(arguments=[], member=isSharedTable, postfix_operators=[], prefix_operators=[], qualifier=symTab, selectors=[], type_arguments=None), label=None, value=None) local_variable[type[int], originalOffset] local_variable[type[int], maxId] if[binary_operation[member[.maxId], ==, literal[0]]] begin[{] call[.writeByte, parameter[Cast(expression=MemberReference(member=TYPE_POS_INT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))]] else begin[{] call[.writeUInt, parameter[member[.maxId]]] call[.writePrefix, parameter[member[.TYPE_POS_INT], binary_operation[binary_operation[member[myBuffer.length], -, member[.myOffset]], -, member[.originalOffset]]]] end[}] call[.writeByte, parameter[Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operandr=MemberReference(member=MAX_ID_SID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))]] local_variable[type[int], maxIdOffset] local_variable[type[int], version] call[.writeUInt, parameter[member[.version]]] call[.writePrefix, parameter[member[.TYPE_POS_INT], binary_operation[binary_operation[member[myBuffer.length], -, member[.myOffset]], -, member[.maxIdOffset]]]] call[.writeByte, parameter[Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operandr=MemberReference(member=VERSION_SID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))]] local_variable[type[String], name] call[.writeIonStringContent, parameter[member[.name]]] call[.writeByte, parameter[Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operandr=MemberReference(member=NAME_SID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))]] call[.writePrefix, parameter[member[.TYPE_STRUCT], binary_operation[binary_operation[member[myBuffer.length], -, member[.myOffset]], -, member[.originalOffset]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[writeImport] operator[SEP] identifier[SymbolTable] identifier[symTab] operator[SEP] { Keyword[assert] identifier[symTab] operator[SEP] identifier[isSharedTable] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[originalOffset] operator[=] identifier[myBuffer] operator[SEP] identifier[length] operator[-] identifier[myOffset] operator[SEP] Keyword[int] identifier[maxId] operator[=] identifier[symTab] operator[SEP] identifier[getMaxId] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[maxId] operator[==] Other[0] operator[SEP] { identifier[writeByte] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] identifier[TYPE_POS_INT] operator[SEP] operator[SEP] } Keyword[else] { identifier[writeUInt] operator[SEP] identifier[maxId] operator[SEP] operator[SEP] identifier[writePrefix] operator[SEP] identifier[TYPE_POS_INT] , identifier[myBuffer] operator[SEP] identifier[length] operator[-] identifier[myOffset] operator[-] identifier[originalOffset] operator[SEP] operator[SEP] } identifier[writeByte] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] literal[Integer] operator[|] identifier[MAX_ID_SID] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[maxIdOffset] operator[=] identifier[myBuffer] operator[SEP] identifier[length] operator[-] identifier[myOffset] operator[SEP] Keyword[int] identifier[version] operator[=] identifier[symTab] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[SEP] identifier[writeUInt] operator[SEP] identifier[version] operator[SEP] operator[SEP] identifier[writePrefix] operator[SEP] identifier[TYPE_POS_INT] , identifier[myBuffer] operator[SEP] identifier[length] operator[-] identifier[myOffset] operator[-] identifier[maxIdOffset] operator[SEP] operator[SEP] identifier[writeByte] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] literal[Integer] operator[|] identifier[VERSION_SID] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[name] operator[=] identifier[symTab] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[writeIonStringContent] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[writeByte] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] literal[Integer] operator[|] identifier[NAME_SID] operator[SEP] operator[SEP] operator[SEP] identifier[writePrefix] operator[SEP] identifier[TYPE_STRUCT] , identifier[myBuffer] operator[SEP] identifier[length] operator[-] identifier[myOffset] operator[-] identifier[originalOffset] operator[SEP] operator[SEP] }
void convertWrapperArraysToPrimitiveArrays(final ClassInfo annotationClassInfo, final String paramName) { if (annotationInfo != null) { // Recursively convert primitive arrays in nested annotations annotationInfo.convertWrapperArraysToPrimitiveArrays(); } else if (objectArrayValue != null) { for (final ObjectTypedValueWrapper elt : objectArrayValue) { if (elt.annotationInfo != null) { // Recurse elt.annotationInfo.convertWrapperArraysToPrimitiveArrays(); } } if (objectArrayValue.getClass().getComponentType().isArray()) { // More than one array dimension -- not possible for annotation parameter values => skip return; } // Find the method in the annotation class with the same name as the annotation parameter. final String targetElementTypeName = (String) getArrayValueClassOrName(annotationClassInfo, paramName, /* getClass = */ false); // Get array element type for 1D non-primitive arrays, and convert to a primitive array switch (targetElementTypeName) { case "java.lang.String": // Convert Object[] array containing String objects to String[] array stringArrayValue = new String[objectArrayValue.length]; for (int j = 0; j < objectArrayValue.length; j++) { stringArrayValue[j] = objectArrayValue[j].stringValue; } objectArrayValue = null; break; case "int": intArrayValue = new int[objectArrayValue.length]; for (int j = 0; j < objectArrayValue.length; j++) { final ObjectTypedValueWrapper elt = objectArrayValue[j]; if (elt == null) { throw new IllegalArgumentException("Illegal null value for array of element type " + targetElementTypeName + " in parameter " + paramName + " of annotation class " + annotationClassInfo.getName()); } intArrayValue[j] = objectArrayValue[j].integerValue; } objectArrayValue = null; break; case "long": longArrayValue = new long[objectArrayValue.length]; for (int j = 0; j < objectArrayValue.length; j++) { final ObjectTypedValueWrapper elt = objectArrayValue[j]; if (elt == null) { throw new IllegalArgumentException("Illegal null value for array of element type " + targetElementTypeName + " in parameter " + paramName + " of annotation class " + annotationClassInfo.getName()); } longArrayValue[j] = objectArrayValue[j].longValue; } objectArrayValue = null; break; case "short": shortArrayValue = new short[objectArrayValue.length]; for (int j = 0; j < objectArrayValue.length; j++) { final ObjectTypedValueWrapper elt = objectArrayValue[j]; if (elt == null) { throw new IllegalArgumentException("Illegal null value for array of element type " + targetElementTypeName + " in parameter " + paramName + " of annotation class " + annotationClassInfo.getName()); } shortArrayValue[j] = objectArrayValue[j].shortValue; } objectArrayValue = null; break; case "char": charArrayValue = new char[objectArrayValue.length]; for (int j = 0; j < objectArrayValue.length; j++) { final ObjectTypedValueWrapper elt = objectArrayValue[j]; if (elt == null) { throw new IllegalArgumentException("Illegal null value for array of element type " + targetElementTypeName + " in parameter " + paramName + " of annotation class " + annotationClassInfo.getName()); } charArrayValue[j] = objectArrayValue[j].characterValue; } objectArrayValue = null; break; case "float": floatArrayValue = new float[objectArrayValue.length]; for (int j = 0; j < objectArrayValue.length; j++) { final ObjectTypedValueWrapper elt = objectArrayValue[j]; if (elt == null) { throw new IllegalArgumentException("Illegal null value for array of element type " + targetElementTypeName + " in parameter " + paramName + " of annotation class " + annotationClassInfo.getName()); } floatArrayValue[j] = objectArrayValue[j].floatValue; } objectArrayValue = null; break; case "double": doubleArrayValue = new double[objectArrayValue.length]; for (int j = 0; j < objectArrayValue.length; j++) { final ObjectTypedValueWrapper elt = objectArrayValue[j]; if (elt == null) { throw new IllegalArgumentException("Illegal null value for array of element type " + targetElementTypeName + " in parameter " + paramName + " of annotation class " + annotationClassInfo.getName()); } doubleArrayValue[j] = objectArrayValue[j].doubleValue; } objectArrayValue = null; break; case "boolean": booleanArrayValue = new boolean[objectArrayValue.length]; for (int j = 0; j < objectArrayValue.length; j++) { final ObjectTypedValueWrapper elt = objectArrayValue[j]; if (elt == null) { throw new IllegalArgumentException("Illegal null value for array of element type " + targetElementTypeName + " in parameter " + paramName + " of annotation class " + annotationClassInfo.getName()); } booleanArrayValue[j] = objectArrayValue[j].booleanValue; } objectArrayValue = null; break; case "byte": byteArrayValue = new byte[objectArrayValue.length]; for (int j = 0; j < objectArrayValue.length; j++) { final ObjectTypedValueWrapper elt = objectArrayValue[j]; if (elt == null) { throw new IllegalArgumentException("Illegal null value for array of element type " + targetElementTypeName + " in parameter " + paramName + " of annotation class " + annotationClassInfo.getName()); } byteArrayValue[j] = objectArrayValue[j].byteValue; } objectArrayValue = null; break; default: // Leave objectArrayValue as-is break; } } }
class class_name[name] begin[{] method[convertWrapperArraysToPrimitiveArrays, return_type[void], modifier[default], parameter[annotationClassInfo, paramName]] begin[{] if[binary_operation[member[.annotationInfo], !=, literal[null]]] begin[{] call[annotationInfo.convertWrapperArraysToPrimitiveArrays, parameter[]] else begin[{] if[binary_operation[member[.objectArrayValue], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=annotationInfo, postfix_operators=[], prefix_operators=[], qualifier=elt, 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=convertWrapperArraysToPrimitiveArrays, postfix_operators=[], prefix_operators=[], qualifier=elt.annotationInfo, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=elt)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ObjectTypedValueWrapper, sub_type=None))), label=None) if[call[objectArrayValue.getClass, parameter[]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[String], targetElementTypeName] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="java.lang.String")], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=stringArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=stringArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=stringValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, 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), StatementExpression(expression=Assignment(expressionl=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="int")], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=intArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=elt)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ObjectTypedValueWrapper, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=elt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal null value for array of element type "), operandr=MemberReference(member=targetElementTypeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" in parameter "), operator=+), operandr=MemberReference(member=paramName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" of annotation class "), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=annotationClassInfo, 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=IllegalArgumentException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=intArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=integerValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, 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), StatementExpression(expression=Assignment(expressionl=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="long")], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=longArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=long))), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=elt)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ObjectTypedValueWrapper, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=elt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal null value for array of element type "), operandr=MemberReference(member=targetElementTypeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" in parameter "), operator=+), operandr=MemberReference(member=paramName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" of annotation class "), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=annotationClassInfo, 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=IllegalArgumentException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=longArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=longValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, 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), StatementExpression(expression=Assignment(expressionl=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="short")], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=shortArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=short))), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=elt)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ObjectTypedValueWrapper, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=elt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal null value for array of element type "), operandr=MemberReference(member=targetElementTypeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" in parameter "), operator=+), operandr=MemberReference(member=paramName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" of annotation class "), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=annotationClassInfo, 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=IllegalArgumentException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=shortArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=shortValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, 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), StatementExpression(expression=Assignment(expressionl=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="char")], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=charArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=char))), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=elt)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ObjectTypedValueWrapper, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=elt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal null value for array of element type "), operandr=MemberReference(member=targetElementTypeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" in parameter "), operator=+), operandr=MemberReference(member=paramName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" of annotation class "), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=annotationClassInfo, 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=IllegalArgumentException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=charArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=characterValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, 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), StatementExpression(expression=Assignment(expressionl=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="float")], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=floatArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=float))), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=elt)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ObjectTypedValueWrapper, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=elt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal null value for array of element type "), operandr=MemberReference(member=targetElementTypeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" in parameter "), operator=+), operandr=MemberReference(member=paramName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" of annotation class "), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=annotationClassInfo, 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=IllegalArgumentException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=floatArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=floatValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, 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), StatementExpression(expression=Assignment(expressionl=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="double")], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=doubleArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=double))), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=elt)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ObjectTypedValueWrapper, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=elt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal null value for array of element type "), operandr=MemberReference(member=targetElementTypeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" in parameter "), operator=+), operandr=MemberReference(member=paramName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" of annotation class "), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=annotationClassInfo, 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=IllegalArgumentException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=doubleArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=doubleValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, 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), StatementExpression(expression=Assignment(expressionl=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="boolean")], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=booleanArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=boolean))), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=elt)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ObjectTypedValueWrapper, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=elt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal null value for array of element type "), operandr=MemberReference(member=targetElementTypeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" in parameter "), operator=+), operandr=MemberReference(member=paramName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" of annotation class "), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=annotationClassInfo, 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=IllegalArgumentException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=booleanArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=booleanValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, 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), StatementExpression(expression=Assignment(expressionl=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="byte")], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=byteArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=elt)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ObjectTypedValueWrapper, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=elt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal null value for array of element type "), operandr=MemberReference(member=targetElementTypeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" in parameter "), operator=+), operandr=MemberReference(member=paramName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" of annotation class "), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=annotationClassInfo, 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=IllegalArgumentException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=byteArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=byteValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=objectArrayValue, 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), StatementExpression(expression=Assignment(expressionl=MemberReference(member=objectArrayValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MemberReference(member=targetElementTypeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) else begin[{] None end[}] end[}] end[}] END[}]
Keyword[void] identifier[convertWrapperArraysToPrimitiveArrays] operator[SEP] Keyword[final] identifier[ClassInfo] identifier[annotationClassInfo] , Keyword[final] identifier[String] identifier[paramName] operator[SEP] { Keyword[if] operator[SEP] identifier[annotationInfo] operator[!=] Other[null] operator[SEP] { identifier[annotationInfo] operator[SEP] identifier[convertWrapperArraysToPrimitiveArrays] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[objectArrayValue] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[ObjectTypedValueWrapper] identifier[elt] operator[:] identifier[objectArrayValue] operator[SEP] { Keyword[if] operator[SEP] identifier[elt] operator[SEP] identifier[annotationInfo] operator[!=] Other[null] operator[SEP] { identifier[elt] operator[SEP] identifier[annotationInfo] operator[SEP] identifier[convertWrapperArraysToPrimitiveArrays] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[objectArrayValue] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getComponentType] operator[SEP] operator[SEP] operator[SEP] identifier[isArray] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } Keyword[final] identifier[String] identifier[targetElementTypeName] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[getArrayValueClassOrName] operator[SEP] identifier[annotationClassInfo] , identifier[paramName] , literal[boolean] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[targetElementTypeName] operator[SEP] { Keyword[case] literal[String] operator[:] identifier[stringArrayValue] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[stringArrayValue] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[stringValue] operator[SEP] } identifier[objectArrayValue] operator[=] Other[null] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[intArrayValue] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[final] identifier[ObjectTypedValueWrapper] identifier[elt] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[elt] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[targetElementTypeName] operator[+] literal[String] operator[+] identifier[paramName] operator[+] literal[String] operator[+] identifier[annotationClassInfo] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[intArrayValue] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[integerValue] operator[SEP] } identifier[objectArrayValue] operator[=] Other[null] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[longArrayValue] operator[=] Keyword[new] Keyword[long] operator[SEP] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[final] identifier[ObjectTypedValueWrapper] identifier[elt] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[elt] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[targetElementTypeName] operator[+] literal[String] operator[+] identifier[paramName] operator[+] literal[String] operator[+] identifier[annotationClassInfo] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[longArrayValue] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[longValue] operator[SEP] } identifier[objectArrayValue] operator[=] Other[null] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[shortArrayValue] operator[=] Keyword[new] Keyword[short] operator[SEP] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[final] identifier[ObjectTypedValueWrapper] identifier[elt] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[elt] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[targetElementTypeName] operator[+] literal[String] operator[+] identifier[paramName] operator[+] literal[String] operator[+] identifier[annotationClassInfo] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[shortArrayValue] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[shortValue] operator[SEP] } identifier[objectArrayValue] operator[=] Other[null] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[charArrayValue] operator[=] Keyword[new] Keyword[char] operator[SEP] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[final] identifier[ObjectTypedValueWrapper] identifier[elt] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[elt] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[targetElementTypeName] operator[+] literal[String] operator[+] identifier[paramName] operator[+] literal[String] operator[+] identifier[annotationClassInfo] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[charArrayValue] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[characterValue] operator[SEP] } identifier[objectArrayValue] operator[=] Other[null] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[floatArrayValue] operator[=] Keyword[new] Keyword[float] operator[SEP] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[final] identifier[ObjectTypedValueWrapper] identifier[elt] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[elt] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[targetElementTypeName] operator[+] literal[String] operator[+] identifier[paramName] operator[+] literal[String] operator[+] identifier[annotationClassInfo] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[floatArrayValue] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[floatValue] operator[SEP] } identifier[objectArrayValue] operator[=] Other[null] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[doubleArrayValue] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[final] identifier[ObjectTypedValueWrapper] identifier[elt] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[elt] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[targetElementTypeName] operator[+] literal[String] operator[+] identifier[paramName] operator[+] literal[String] operator[+] identifier[annotationClassInfo] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[doubleArrayValue] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] } identifier[objectArrayValue] operator[=] Other[null] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[booleanArrayValue] operator[=] Keyword[new] Keyword[boolean] operator[SEP] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[final] identifier[ObjectTypedValueWrapper] identifier[elt] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[elt] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[targetElementTypeName] operator[+] literal[String] operator[+] identifier[paramName] operator[+] literal[String] operator[+] identifier[annotationClassInfo] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[booleanArrayValue] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[booleanValue] operator[SEP] } identifier[objectArrayValue] operator[=] Other[null] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[byteArrayValue] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[objectArrayValue] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[final] identifier[ObjectTypedValueWrapper] identifier[elt] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[elt] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[targetElementTypeName] operator[+] literal[String] operator[+] identifier[paramName] operator[+] literal[String] operator[+] identifier[annotationClassInfo] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[byteArrayValue] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[objectArrayValue] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[byteValue] operator[SEP] } identifier[objectArrayValue] operator[=] Other[null] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP] } } }
public final void synpred2_DRL5Expressions_fragment() throws RecognitionException { // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:138:44: ( LEFT_SQUARE RIGHT_SQUARE ) // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:138:45: LEFT_SQUARE RIGHT_SQUARE { match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_synpred2_DRL5Expressions559); if (state.failed) return; match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_synpred2_DRL5Expressions561); if (state.failed) return; } }
class class_name[name] begin[{] method[synpred2_DRL5Expressions_fragment, return_type[void], modifier[final public], parameter[]] begin[{] call[.match, parameter[member[.input], member[.LEFT_SQUARE], member[.FOLLOW_LEFT_SQUARE_in_synpred2_DRL5Expressions559]]] if[member[state.failed]] begin[{] return[None] else begin[{] None end[}] call[.match, parameter[member[.input], member[.RIGHT_SQUARE], member[.FOLLOW_RIGHT_SQUARE_in_synpred2_DRL5Expressions561]]] if[member[state.failed]] begin[{] return[None] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[synpred2_DRL5Expressions_fragment] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { { identifier[match] operator[SEP] identifier[input] , identifier[LEFT_SQUARE] , identifier[FOLLOW_LEFT_SQUARE_in_synpred2_DRL5Expressions559] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] identifier[match] operator[SEP] identifier[input] , identifier[RIGHT_SQUARE] , identifier[FOLLOW_RIGHT_SQUARE_in_synpred2_DRL5Expressions561] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } }
public Swagger2MarkupConfigBuilder withPathsGroupedBy(GroupBy pathsGroupedBy) { Validate.notNull(pathsGroupedBy, "%s must not be null", "pathsGroupedBy"); config.pathsGroupedBy = pathsGroupedBy; return this; }
class class_name[name] begin[{] method[withPathsGroupedBy, return_type[type[Swagger2MarkupConfigBuilder]], modifier[public], parameter[pathsGroupedBy]] begin[{] call[Validate.notNull, parameter[member[.pathsGroupedBy], literal["%s must not be null"], literal["pathsGroupedBy"]]] assign[member[config.pathsGroupedBy], member[.pathsGroupedBy]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Swagger2MarkupConfigBuilder] identifier[withPathsGroupedBy] operator[SEP] identifier[GroupBy] identifier[pathsGroupedBy] operator[SEP] { identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[pathsGroupedBy] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[config] operator[SEP] identifier[pathsGroupedBy] operator[=] identifier[pathsGroupedBy] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
private boolean readNextRow() { boolean hasNext = false; try { if(!stop) { String row = ""; do { row = getReader().readLine(); } while(row.length() == 0); if(!row.startsWith("{\"last_seq\":")) { setNextRow(gson.fromJson(row, Row.class)); hasNext = true; } } } catch (Exception e) { terminate(); throw new CouchDbException("Error reading continuous stream.", e); } if(!hasNext) terminate(); return hasNext; }
class class_name[name] begin[{] method[readNextRow, return_type[type[boolean]], modifier[private], parameter[]] begin[{] local_variable[type[boolean], hasNext] TryStatement(block=[IfStatement(condition=MemberReference(member=stop, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), name=row)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), DoStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getReader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=readLine, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]), condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=row, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), label=None), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="{\"last_seq\":")], member=startsWith, postfix_operators=[], prefix_operators=['!'], qualifier=row, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Row, sub_type=None))], member=fromJson, postfix_operators=[], prefix_operators=[], qualifier=gson, selectors=[], type_arguments=None)], member=setNextRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=terminate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error reading continuous stream."), 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=CouchDbException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) if[member[.hasNext]] begin[{] call[.terminate, parameter[]] else begin[{] None end[}] return[member[.hasNext]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[readNextRow] operator[SEP] operator[SEP] { Keyword[boolean] identifier[hasNext] operator[=] literal[boolean] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] operator[!] identifier[stop] operator[SEP] { identifier[String] identifier[row] operator[=] literal[String] operator[SEP] Keyword[do] { identifier[row] operator[=] identifier[getReader] operator[SEP] operator[SEP] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] identifier[row] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[row] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[setNextRow] operator[SEP] identifier[gson] operator[SEP] identifier[fromJson] operator[SEP] identifier[row] , identifier[Row] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] identifier[hasNext] operator[=] literal[boolean] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[terminate] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[CouchDbException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[hasNext] operator[SEP] identifier[terminate] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[hasNext] operator[SEP] }
@Path("connections") public DirectoryResource<Connection, APIConnection> getConnectionDirectoryResource() throws GuacamoleException { return connectionDirectoryResourceFactory.create(userContext, userContext.getConnectionDirectory()); }
class class_name[name] begin[{] method[getConnectionDirectoryResource, return_type[type[DirectoryResource]], modifier[public], parameter[]] begin[{] return[call[connectionDirectoryResourceFactory.create, parameter[member[.userContext], call[userContext.getConnectionDirectory, parameter[]]]]] end[}] END[}]
annotation[@] identifier[Path] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[DirectoryResource] operator[<] identifier[Connection] , identifier[APIConnection] operator[>] identifier[getConnectionDirectoryResource] operator[SEP] operator[SEP] Keyword[throws] identifier[GuacamoleException] { Keyword[return] identifier[connectionDirectoryResourceFactory] operator[SEP] identifier[create] operator[SEP] identifier[userContext] , identifier[userContext] operator[SEP] identifier[getConnectionDirectory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public EEnum getPluginType() { if (pluginTypeEEnum == null) { pluginTypeEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI).getEClassifiers().get(105); } return pluginTypeEEnum; }
class class_name[name] begin[{] method[getPluginType, return_type[type[EEnum]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.pluginTypeEEnum], ==, literal[null]]] begin[{] assign[member[.pluginTypeEEnum], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=StorePackage, 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=105)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EEnum, sub_type=None))] else begin[{] None end[}] return[member[.pluginTypeEEnum]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EEnum] identifier[getPluginType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[pluginTypeEEnum] operator[==] Other[null] operator[SEP] { identifier[pluginTypeEEnum] operator[=] operator[SEP] identifier[EEnum] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[StorePackage] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[105] operator[SEP] operator[SEP] } Keyword[return] identifier[pluginTypeEEnum] operator[SEP] }
private NamingEnumeration search(String base, String filter, String[] returnAttrs) throws NamingException { SearchControls constraints = new SearchControls(); constraints.setSearchScope(SearchControls.SUBTREE_SCOPE); constraints.setReturningAttributes(returnAttrs); // search the directory based on base, filter, and contraints //logger.debug("searching, base: " + base + " using filter: " + filter); DirContext dirContext = context(); // get established jndi connection return dirContext.search(base, filter, constraints); }
class class_name[name] begin[{] method[search, return_type[type[NamingEnumeration]], modifier[private], parameter[base, filter, returnAttrs]] begin[{] local_variable[type[SearchControls], constraints] call[constraints.setSearchScope, parameter[member[SearchControls.SUBTREE_SCOPE]]] call[constraints.setReturningAttributes, parameter[member[.returnAttrs]]] local_variable[type[DirContext], dirContext] return[call[dirContext.search, parameter[member[.base], member[.filter], member[.constraints]]]] end[}] END[}]
Keyword[private] identifier[NamingEnumeration] identifier[search] operator[SEP] identifier[String] identifier[base] , identifier[String] identifier[filter] , identifier[String] operator[SEP] operator[SEP] identifier[returnAttrs] operator[SEP] Keyword[throws] identifier[NamingException] { identifier[SearchControls] identifier[constraints] operator[=] Keyword[new] identifier[SearchControls] operator[SEP] operator[SEP] operator[SEP] identifier[constraints] operator[SEP] identifier[setSearchScope] operator[SEP] identifier[SearchControls] operator[SEP] identifier[SUBTREE_SCOPE] operator[SEP] operator[SEP] identifier[constraints] operator[SEP] identifier[setReturningAttributes] operator[SEP] identifier[returnAttrs] operator[SEP] operator[SEP] identifier[DirContext] identifier[dirContext] operator[=] identifier[context] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[dirContext] operator[SEP] identifier[search] operator[SEP] identifier[base] , identifier[filter] , identifier[constraints] operator[SEP] operator[SEP] }
void generateDiffEvidence(EvidenceDir baseEvidenceDir, File evidenceFile, boolean withUnmatch) throws IOException { File baseEvidence = new File(baseEvidenceDir.getDir(), evidenceFile.getName()); DiffEvidence diffEvidence = appCtx.getBean(DiffEvidence.class); load(diffEvidence, baseEvidenceDir, baseEvidence, evidenceFile, withUnmatch); templateEngine.write(diffEvidence); File maskEvidence = new File(evidenceFile.getParent(), EvidenceDir.toMaskEvidenceName(evidenceFile.getName())); if (!withUnmatch && maskEvidence.exists()) { generateMaskDiffEvidence(diffEvidence, baseEvidence, evidenceFile, withUnmatch); } }
class class_name[name] begin[{] method[generateDiffEvidence, return_type[void], modifier[default], parameter[baseEvidenceDir, evidenceFile, withUnmatch]] begin[{] local_variable[type[File], baseEvidence] local_variable[type[DiffEvidence], diffEvidence] call[.load, parameter[member[.diffEvidence], member[.baseEvidenceDir], member[.baseEvidence], member[.evidenceFile], member[.withUnmatch]]] call[templateEngine.write, parameter[member[.diffEvidence]]] local_variable[type[File], maskEvidence] if[binary_operation[member[.withUnmatch], &&, call[maskEvidence.exists, parameter[]]]] begin[{] call[.generateMaskDiffEvidence, parameter[member[.diffEvidence], member[.baseEvidence], member[.evidenceFile], member[.withUnmatch]]] else begin[{] None end[}] end[}] END[}]
Keyword[void] identifier[generateDiffEvidence] operator[SEP] identifier[EvidenceDir] identifier[baseEvidenceDir] , identifier[File] identifier[evidenceFile] , Keyword[boolean] identifier[withUnmatch] operator[SEP] Keyword[throws] identifier[IOException] { identifier[File] identifier[baseEvidence] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[baseEvidenceDir] operator[SEP] identifier[getDir] operator[SEP] operator[SEP] , identifier[evidenceFile] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[DiffEvidence] identifier[diffEvidence] operator[=] identifier[appCtx] operator[SEP] identifier[getBean] operator[SEP] identifier[DiffEvidence] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[load] operator[SEP] identifier[diffEvidence] , identifier[baseEvidenceDir] , identifier[baseEvidence] , identifier[evidenceFile] , identifier[withUnmatch] operator[SEP] operator[SEP] identifier[templateEngine] operator[SEP] identifier[write] operator[SEP] identifier[diffEvidence] operator[SEP] operator[SEP] identifier[File] identifier[maskEvidence] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[evidenceFile] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] , identifier[EvidenceDir] operator[SEP] identifier[toMaskEvidenceName] operator[SEP] identifier[evidenceFile] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[withUnmatch] operator[&&] identifier[maskEvidence] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[generateMaskDiffEvidence] operator[SEP] identifier[diffEvidence] , identifier[baseEvidence] , identifier[evidenceFile] , identifier[withUnmatch] operator[SEP] operator[SEP] } }
protected void _format(SarlBehaviorUnit behaviorUnit, IFormattableDocument document) { formatAnnotations(behaviorUnit, document, XbaseFormatterPreferenceKeys.newLineAfterMethodAnnotations); final ISemanticRegionsFinder regionFor = this.textRegionExtensions.regionFor(behaviorUnit); document.append(regionFor.keyword(this.keywords.getOnKeyword()), ONE_SPACE); if (behaviorUnit.getGuard() != null) { ISemanticRegion keyword = this.textRegionExtensions.immediatelyPreceding( behaviorUnit.getGuard()).keyword(this.keywords.getLeftSquareBracketKeyword()); document.prepend(keyword, ONE_SPACE); document.append(keyword, NO_SPACE); keyword = this.textRegionExtensions.immediatelyFollowing( behaviorUnit.getGuard()).keyword(this.keywords.getRightSquareBracketKeyword()); document.prepend(keyword, NO_SPACE); } document.format(behaviorUnit.getName()); document.format(behaviorUnit.getGuard()); final XExpression expression = behaviorUnit.getExpression(); if (expression != null) { final ISemanticRegionFinder finder = this.textRegionExtensions.regionFor(expression); final ISemanticRegion brace = finder.keyword(this.keywords.getLeftCurlyBracketKeyword()); document.prepend(brace, XbaseFormatterPreferenceKeys.bracesInNewLine); document.format(expression); } }
class class_name[name] begin[{] method[_format, return_type[void], modifier[protected], parameter[behaviorUnit, document]] begin[{] call[.formatAnnotations, parameter[member[.behaviorUnit], member[.document], member[XbaseFormatterPreferenceKeys.newLineAfterMethodAnnotations]]] local_variable[type[ISemanticRegionsFinder], regionFor] call[document.append, parameter[call[regionFor.keyword, parameter[THIS[member[None.keywords]call[None.getOnKeyword, parameter[]]]]], member[.ONE_SPACE]]] if[binary_operation[call[behaviorUnit.getGuard, parameter[]], !=, literal[null]]] begin[{] local_variable[type[ISemanticRegion], keyword] call[document.prepend, parameter[member[.keyword], member[.ONE_SPACE]]] call[document.append, parameter[member[.keyword], member[.NO_SPACE]]] assign[member[.keyword], THIS[member[None.textRegionExtensions]call[None.immediatelyFollowing, parameter[call[behaviorUnit.getGuard, parameter[]]]]call[None.keyword, parameter[THIS[member[None.keywords]call[None.getRightSquareBracketKeyword, parameter[]]]]]]] call[document.prepend, parameter[member[.keyword], member[.NO_SPACE]]] else begin[{] None end[}] call[document.format, parameter[call[behaviorUnit.getName, parameter[]]]] call[document.format, parameter[call[behaviorUnit.getGuard, parameter[]]]] local_variable[type[XExpression], expression] if[binary_operation[member[.expression], !=, literal[null]]] begin[{] local_variable[type[ISemanticRegionFinder], finder] local_variable[type[ISemanticRegion], brace] call[document.prepend, parameter[member[.brace], member[XbaseFormatterPreferenceKeys.bracesInNewLine]]] call[document.format, parameter[member[.expression]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[_format] operator[SEP] identifier[SarlBehaviorUnit] identifier[behaviorUnit] , identifier[IFormattableDocument] identifier[document] operator[SEP] { identifier[formatAnnotations] operator[SEP] identifier[behaviorUnit] , identifier[document] , identifier[XbaseFormatterPreferenceKeys] operator[SEP] identifier[newLineAfterMethodAnnotations] operator[SEP] operator[SEP] Keyword[final] identifier[ISemanticRegionsFinder] identifier[regionFor] operator[=] Keyword[this] operator[SEP] identifier[textRegionExtensions] operator[SEP] identifier[regionFor] operator[SEP] identifier[behaviorUnit] operator[SEP] operator[SEP] identifier[document] operator[SEP] identifier[append] operator[SEP] identifier[regionFor] operator[SEP] identifier[keyword] operator[SEP] Keyword[this] operator[SEP] identifier[keywords] operator[SEP] identifier[getOnKeyword] operator[SEP] operator[SEP] operator[SEP] , identifier[ONE_SPACE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[behaviorUnit] operator[SEP] identifier[getGuard] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[ISemanticRegion] identifier[keyword] operator[=] Keyword[this] operator[SEP] identifier[textRegionExtensions] operator[SEP] identifier[immediatelyPreceding] operator[SEP] identifier[behaviorUnit] operator[SEP] identifier[getGuard] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[keyword] operator[SEP] Keyword[this] operator[SEP] identifier[keywords] operator[SEP] identifier[getLeftSquareBracketKeyword] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[document] operator[SEP] identifier[prepend] operator[SEP] identifier[keyword] , identifier[ONE_SPACE] operator[SEP] operator[SEP] identifier[document] operator[SEP] identifier[append] operator[SEP] identifier[keyword] , identifier[NO_SPACE] operator[SEP] operator[SEP] identifier[keyword] operator[=] Keyword[this] operator[SEP] identifier[textRegionExtensions] operator[SEP] identifier[immediatelyFollowing] operator[SEP] identifier[behaviorUnit] operator[SEP] identifier[getGuard] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[keyword] operator[SEP] Keyword[this] operator[SEP] identifier[keywords] operator[SEP] identifier[getRightSquareBracketKeyword] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[document] operator[SEP] identifier[prepend] operator[SEP] identifier[keyword] , identifier[NO_SPACE] operator[SEP] operator[SEP] } identifier[document] operator[SEP] identifier[format] operator[SEP] identifier[behaviorUnit] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[document] operator[SEP] identifier[format] operator[SEP] identifier[behaviorUnit] operator[SEP] identifier[getGuard] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[XExpression] identifier[expression] operator[=] identifier[behaviorUnit] operator[SEP] identifier[getExpression] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[expression] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[ISemanticRegionFinder] identifier[finder] operator[=] Keyword[this] operator[SEP] identifier[textRegionExtensions] operator[SEP] identifier[regionFor] operator[SEP] identifier[expression] operator[SEP] operator[SEP] Keyword[final] identifier[ISemanticRegion] identifier[brace] operator[=] identifier[finder] operator[SEP] identifier[keyword] operator[SEP] Keyword[this] operator[SEP] identifier[keywords] operator[SEP] identifier[getLeftCurlyBracketKeyword] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[document] operator[SEP] identifier[prepend] operator[SEP] identifier[brace] , identifier[XbaseFormatterPreferenceKeys] operator[SEP] identifier[bracesInNewLine] operator[SEP] operator[SEP] identifier[document] operator[SEP] identifier[format] operator[SEP] identifier[expression] operator[SEP] operator[SEP] } }
public synchronized long getLastModified( Artifact artifact ) throws IOException, ArtifactNotFoundException { Map<String, Map<String, Map<Artifact, Content>>> artifactMap = contents.get( artifact.getGroupId() ); Map<String, Map<Artifact, Content>> versionMap = ( artifactMap == null ? null : artifactMap.get( artifact.getArtifactId() ) ); Map<Artifact, Content> filesMap = ( versionMap == null ? null : versionMap.get( artifact.getVersion() ) ); Content content = ( filesMap == null ? null : filesMap.get( artifact ) ); if ( content == null ) { if ( artifact.isSnapshot() && artifact.getTimestamp() == null && filesMap != null ) { Artifact best = null; for ( Map.Entry<Artifact, Content> entry : filesMap.entrySet() ) { Artifact a = entry.getKey(); if ( artifact.equalSnapshots( a ) && ( best == null || best.compareTo( a ) < 0 ) ) { best = a; content = entry.getValue(); } } if ( content == null ) { throw new ArtifactNotFoundException( artifact ); } } else { throw new ArtifactNotFoundException( artifact ); } } return content.getLastModified(); }
class class_name[name] begin[{] method[getLastModified, return_type[type[long]], modifier[synchronized public], parameter[artifact]] begin[{] local_variable[type[Map], artifactMap] local_variable[type[Map], versionMap] local_variable[type[Map], filesMap] local_variable[type[Content], content] if[binary_operation[member[.content], ==, literal[null]]] begin[{] if[binary_operation[binary_operation[call[artifact.isSnapshot, parameter[]], &&, binary_operation[call[artifact.getTimestamp, parameter[]], ==, literal[null]]], &&, binary_operation[member[.filesMap], !=, literal[null]]]] begin[{] local_variable[type[Artifact], best] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), name=a)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Artifact, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equalSnapshots, postfix_operators=[], prefix_operators=[], qualifier=artifact, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=best, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compareTo, postfix_operators=[], prefix_operators=[], qualifier=best, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), operator=||), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=best, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=filesMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Artifact, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Content, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) if[binary_operation[member[.content], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=artifact, 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=ArtifactNotFoundException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=artifact, 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=ArtifactNotFoundException, sub_type=None)), label=None) end[}] else begin[{] None end[}] return[call[content.getLastModified, parameter[]]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[long] identifier[getLastModified] operator[SEP] identifier[Artifact] identifier[artifact] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ArtifactNotFoundException] { identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[Artifact] , identifier[Content] operator[>] operator[>] operator[>] identifier[artifactMap] operator[=] identifier[contents] operator[SEP] identifier[get] operator[SEP] identifier[artifact] operator[SEP] identifier[getGroupId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[Artifact] , identifier[Content] operator[>] operator[>] identifier[versionMap] operator[=] operator[SEP] identifier[artifactMap] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[artifactMap] operator[SEP] identifier[get] operator[SEP] identifier[artifact] operator[SEP] identifier[getArtifactId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[Artifact] , identifier[Content] operator[>] identifier[filesMap] operator[=] operator[SEP] identifier[versionMap] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[versionMap] operator[SEP] identifier[get] operator[SEP] identifier[artifact] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Content] identifier[content] operator[=] operator[SEP] identifier[filesMap] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[filesMap] operator[SEP] identifier[get] operator[SEP] identifier[artifact] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[content] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[artifact] operator[SEP] identifier[isSnapshot] operator[SEP] operator[SEP] operator[&&] identifier[artifact] operator[SEP] identifier[getTimestamp] operator[SEP] operator[SEP] operator[==] Other[null] operator[&&] identifier[filesMap] operator[!=] Other[null] operator[SEP] { identifier[Artifact] identifier[best] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Artifact] , identifier[Content] operator[>] identifier[entry] operator[:] identifier[filesMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[Artifact] identifier[a] operator[=] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[artifact] operator[SEP] identifier[equalSnapshots] operator[SEP] identifier[a] operator[SEP] operator[&&] operator[SEP] identifier[best] operator[==] Other[null] operator[||] identifier[best] operator[SEP] identifier[compareTo] operator[SEP] identifier[a] operator[SEP] operator[<] Other[0] operator[SEP] operator[SEP] { identifier[best] operator[=] identifier[a] operator[SEP] identifier[content] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[content] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[ArtifactNotFoundException] operator[SEP] identifier[artifact] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[throw] Keyword[new] identifier[ArtifactNotFoundException] operator[SEP] identifier[artifact] operator[SEP] operator[SEP] } } Keyword[return] identifier[content] operator[SEP] identifier[getLastModified] operator[SEP] operator[SEP] operator[SEP] }
@XmlElementDecl(namespace = "http://schema.intuit.com/finance/v3", name = "BooleanTypeCustomFieldDefinition", substitutionHeadNamespace = "http://schema.intuit.com/finance/v3", substitutionHeadName = "IntuitObject") public JAXBElement<BooleanTypeCustomFieldDefinition> createBooleanTypeCustomFieldDefinition(BooleanTypeCustomFieldDefinition value) { return new JAXBElement<BooleanTypeCustomFieldDefinition>(_BooleanTypeCustomFieldDefinition_QNAME, BooleanTypeCustomFieldDefinition.class, null, value); }
class class_name[name] begin[{] method[createBooleanTypeCustomFieldDefinition, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_BooleanTypeCustomFieldDefinition_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BooleanTypeCustomFieldDefinition, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=BooleanTypeCustomFieldDefinition, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[substitutionHeadNamespace] operator[=] literal[String] , identifier[substitutionHeadName] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[BooleanTypeCustomFieldDefinition] operator[>] identifier[createBooleanTypeCustomFieldDefinition] operator[SEP] identifier[BooleanTypeCustomFieldDefinition] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[BooleanTypeCustomFieldDefinition] operator[>] operator[SEP] identifier[_BooleanTypeCustomFieldDefinition_QNAME] , identifier[BooleanTypeCustomFieldDefinition] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
boolean doJarFile(String jarname) throws IOException { try (JarFile jf = new JarFile(jarname)) { Stream<String> files = jf.stream() .map(JarEntry::getName); return doFileNames(files); } }
class class_name[name] begin[{] method[doJarFile, return_type[type[boolean]], modifier[default], parameter[jarname]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=stream, postfix_operators=[], prefix_operators=[], qualifier=jf, selectors=[MethodInvocation(arguments=[MethodReference(expression=MemberReference(member=JarEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=getName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])], member=map, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=files)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Stream, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doFileNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=jf, type=ReferenceType(arguments=None, dimensions=[], name=JarFile, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=jarname, 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=JarFile, sub_type=None)))]) end[}] END[}]
Keyword[boolean] identifier[doJarFile] operator[SEP] identifier[String] identifier[jarname] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] operator[SEP] identifier[JarFile] identifier[jf] operator[=] Keyword[new] identifier[JarFile] operator[SEP] identifier[jarname] operator[SEP] operator[SEP] { identifier[Stream] operator[<] identifier[String] operator[>] identifier[files] operator[=] identifier[jf] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[JarEntry] operator[::] identifier[getName] operator[SEP] operator[SEP] Keyword[return] identifier[doFileNames] operator[SEP] identifier[files] operator[SEP] operator[SEP] } }
public static OffsetDateTime toOffsetDateTime(Instant time, ZoneId zoneId) { Assert.notNull(time, "Missing time!"); if (zoneId == null) { zoneId = ZoneId.from(time); } return OffsetDateTime.ofInstant(time, zoneId); }
class class_name[name] begin[{] method[toOffsetDateTime, return_type[type[OffsetDateTime]], modifier[public static], parameter[time, zoneId]] begin[{] call[Assert.notNull, parameter[member[.time], literal["Missing time!"]]] if[binary_operation[member[.zoneId], ==, literal[null]]] begin[{] assign[member[.zoneId], call[ZoneId.from, parameter[member[.time]]]] else begin[{] None end[}] return[call[OffsetDateTime.ofInstant, parameter[member[.time], member[.zoneId]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[OffsetDateTime] identifier[toOffsetDateTime] operator[SEP] identifier[Instant] identifier[time] , identifier[ZoneId] identifier[zoneId] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[time] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[zoneId] operator[==] Other[null] operator[SEP] { identifier[zoneId] operator[=] identifier[ZoneId] operator[SEP] identifier[from] operator[SEP] identifier[time] operator[SEP] operator[SEP] } Keyword[return] identifier[OffsetDateTime] operator[SEP] identifier[ofInstant] operator[SEP] identifier[time] , identifier[zoneId] operator[SEP] operator[SEP] }
private void initQualityScoreSettings() { QualityScoreSettings qualityScoreSettings = this.scoreSettings.getQualityWidget(); if (null != qualityScoreSettings) { qualityScoreSettings.setCriteria( Utils.mergeCriteria(this.scoreSettings.getCriteria(), qualityScoreSettings.getCriteria()) ); initQualityScoreChildrenSettings(qualityScoreSettings); } }
class class_name[name] begin[{] method[initQualityScoreSettings, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[QualityScoreSettings], qualityScoreSettings] if[binary_operation[literal[null], !=, member[.qualityScoreSettings]]] begin[{] call[qualityScoreSettings.setCriteria, parameter[call[Utils.mergeCriteria, parameter[THIS[member[None.scoreSettings]call[None.getCriteria, parameter[]]], call[qualityScoreSettings.getCriteria, parameter[]]]]]] call[.initQualityScoreChildrenSettings, parameter[member[.qualityScoreSettings]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[initQualityScoreSettings] operator[SEP] operator[SEP] { identifier[QualityScoreSettings] identifier[qualityScoreSettings] operator[=] Keyword[this] operator[SEP] identifier[scoreSettings] operator[SEP] identifier[getQualityWidget] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[qualityScoreSettings] operator[SEP] { identifier[qualityScoreSettings] operator[SEP] identifier[setCriteria] operator[SEP] identifier[Utils] operator[SEP] identifier[mergeCriteria] operator[SEP] Keyword[this] operator[SEP] identifier[scoreSettings] operator[SEP] identifier[getCriteria] operator[SEP] operator[SEP] , identifier[qualityScoreSettings] operator[SEP] identifier[getCriteria] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[initQualityScoreChildrenSettings] operator[SEP] identifier[qualityScoreSettings] operator[SEP] operator[SEP] } }
public CassandraJavaRDD<R> perPartitionLimit(Long rowsNumber) { CassandraRDD<R> newRDD = rdd().perPartitionLimit(rowsNumber); return wrap(newRDD); }
class class_name[name] begin[{] method[perPartitionLimit, return_type[type[CassandraJavaRDD]], modifier[public], parameter[rowsNumber]] begin[{] local_variable[type[CassandraRDD], newRDD] return[call[.wrap, parameter[member[.newRDD]]]] end[}] END[}]
Keyword[public] identifier[CassandraJavaRDD] operator[<] identifier[R] operator[>] identifier[perPartitionLimit] operator[SEP] identifier[Long] identifier[rowsNumber] operator[SEP] { identifier[CassandraRDD] operator[<] identifier[R] operator[>] identifier[newRDD] operator[=] identifier[rdd] operator[SEP] operator[SEP] operator[SEP] identifier[perPartitionLimit] operator[SEP] identifier[rowsNumber] operator[SEP] operator[SEP] Keyword[return] identifier[wrap] operator[SEP] identifier[newRDD] operator[SEP] operator[SEP] }
protected <E> Page<E> findPaginatedGeneric(Pageable pageable, JPAQuery<E> query, boolean determineTotal) { long total = -1; if (determineTotal) { total = query.clone().fetchCount(); } long offset = 0; if (pageable != null) { offset = pageable.getOffset(); query.offset(offset); query.limit(pageable.getPageSize()); applySort(query, pageable.getSort()); } List<E> hits = query.fetch(); if (total == -1) { total = offset + hits.size(); } return new PageImpl<>(hits, pageable, total); }
class class_name[name] begin[{] method[findPaginatedGeneric, return_type[type[Page]], modifier[protected], parameter[pageable, query, determineTotal]] begin[{] local_variable[type[long], total] if[member[.determineTotal]] begin[{] assign[member[.total], call[query.clone, parameter[]]] else begin[{] None end[}] local_variable[type[long], offset] if[binary_operation[member[.pageable], !=, literal[null]]] begin[{] assign[member[.offset], call[pageable.getOffset, parameter[]]] call[query.offset, parameter[member[.offset]]] call[query.limit, parameter[call[pageable.getPageSize, parameter[]]]] call[.applySort, parameter[member[.query], call[pageable.getSort, parameter[]]]] else begin[{] None end[}] local_variable[type[List], hits] if[binary_operation[member[.total], ==, literal[1]]] begin[{] assign[member[.total], binary_operation[member[.offset], +, call[hits.size, parameter[]]]] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=hits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pageable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=total, 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=PageImpl, sub_type=None))] end[}] END[}]
Keyword[protected] operator[<] identifier[E] operator[>] identifier[Page] operator[<] identifier[E] operator[>] identifier[findPaginatedGeneric] operator[SEP] identifier[Pageable] identifier[pageable] , identifier[JPAQuery] operator[<] identifier[E] operator[>] identifier[query] , Keyword[boolean] identifier[determineTotal] operator[SEP] { Keyword[long] identifier[total] operator[=] operator[-] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[determineTotal] operator[SEP] { identifier[total] operator[=] identifier[query] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] identifier[fetchCount] operator[SEP] operator[SEP] operator[SEP] } Keyword[long] identifier[offset] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[pageable] operator[!=] Other[null] operator[SEP] { identifier[offset] operator[=] identifier[pageable] operator[SEP] identifier[getOffset] operator[SEP] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[offset] operator[SEP] identifier[offset] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[limit] operator[SEP] identifier[pageable] operator[SEP] identifier[getPageSize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[applySort] operator[SEP] identifier[query] , identifier[pageable] operator[SEP] identifier[getSort] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[E] operator[>] identifier[hits] operator[=] identifier[query] operator[SEP] identifier[fetch] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[total] operator[==] operator[-] Other[1] operator[SEP] { identifier[total] operator[=] identifier[offset] operator[+] identifier[hits] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[PageImpl] operator[<] operator[>] operator[SEP] identifier[hits] , identifier[pageable] , identifier[total] operator[SEP] operator[SEP] }
public Paint getFrameInteriorPaint(Shape s, int titleHeight, int topToolBarHeight, int bottomToolBarHeight) { return createFrameGradient(s, titleHeight, topToolBarHeight, bottomToolBarHeight, getFrameInteriorColors()); }
class class_name[name] begin[{] method[getFrameInteriorPaint, return_type[type[Paint]], modifier[public], parameter[s, titleHeight, topToolBarHeight, bottomToolBarHeight]] begin[{] return[call[.createFrameGradient, parameter[member[.s], member[.titleHeight], member[.topToolBarHeight], member[.bottomToolBarHeight], call[.getFrameInteriorColors, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[Paint] identifier[getFrameInteriorPaint] operator[SEP] identifier[Shape] identifier[s] , Keyword[int] identifier[titleHeight] , Keyword[int] identifier[topToolBarHeight] , Keyword[int] identifier[bottomToolBarHeight] operator[SEP] { Keyword[return] identifier[createFrameGradient] operator[SEP] identifier[s] , identifier[titleHeight] , identifier[topToolBarHeight] , identifier[bottomToolBarHeight] , identifier[getFrameInteriorColors] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public OperationStatus deleteEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId) { return deleteEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId).toBlocking().single().body(); }
class class_name[name] begin[{] method[deleteEntityRole, return_type[type[OperationStatus]], modifier[public], parameter[appId, versionId, entityId, roleId]] begin[{] return[call[.deleteEntityRoleWithServiceResponseAsync, parameter[member[.appId], member[.versionId], member[.entityId], member[.roleId]]]] end[}] END[}]
Keyword[public] identifier[OperationStatus] identifier[deleteEntityRole] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[UUID] identifier[entityId] , identifier[UUID] identifier[roleId] operator[SEP] { Keyword[return] identifier[deleteEntityRoleWithServiceResponseAsync] operator[SEP] identifier[appId] , identifier[versionId] , identifier[entityId] , identifier[roleId] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
@Nonnull public static <T extends Comparable<T>> List<T> sortOptionallyComparables(@Nonnull Collection<T> toReturn) { List<T> list = new ArrayList<>(toReturn); try { Collections.sort(list); } catch (IllegalArgumentException e) { // catch possible sorting misbehaviour if (!e.getMessage().contains("Comparison method violates its general contract!")) { throw e; } // otherwise print a warning and leave the list unsorted } return list; }
class class_name[name] begin[{] method[sortOptionallyComparables, return_type[type[List]], modifier[public static], parameter[toReturn]] begin[{] local_variable[type[List], list] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sort, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=['!'], qualifier=e, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Comparison method violates its general contract!")], member=contains, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None) return[member[.list]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] identifier[T] operator[>] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[sortOptionallyComparables] operator[SEP] annotation[@] identifier[Nonnull] identifier[Collection] operator[<] identifier[T] operator[>] identifier[toReturn] operator[SEP] { identifier[List] operator[<] identifier[T] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[toReturn] operator[SEP] operator[SEP] Keyword[try] { identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[list] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } } Keyword[return] identifier[list] operator[SEP] }
public List<CmsGroup> getGroupsOfUser(CmsDbContext dbc, String username, boolean readRoles) throws CmsException { return getGroupsOfUser(dbc, username, "", true, readRoles, false, dbc.getRequestContext().getRemoteAddress()); }
class class_name[name] begin[{] method[getGroupsOfUser, return_type[type[List]], modifier[public], parameter[dbc, username, readRoles]] begin[{] return[call[.getGroupsOfUser, parameter[member[.dbc], member[.username], literal[""], literal[true], member[.readRoles], literal[false], call[dbc.getRequestContext, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[CmsGroup] operator[>] identifier[getGroupsOfUser] operator[SEP] identifier[CmsDbContext] identifier[dbc] , identifier[String] identifier[username] , Keyword[boolean] identifier[readRoles] operator[SEP] Keyword[throws] identifier[CmsException] { Keyword[return] identifier[getGroupsOfUser] operator[SEP] identifier[dbc] , identifier[username] , literal[String] , literal[boolean] , identifier[readRoles] , literal[boolean] , identifier[dbc] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[getRemoteAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void initialize() { this.setLayout(new CardLayout()); this.setName(getContextIndex() + ": " + PANEL_NAME); this.setLayout(new GridBagLayout()); this.setBorder(new EmptyBorder(2, 2, 2, 2)); this.add(new JLabel(Constant.messages.getString("sessionmanagement.panel.label.description")), LayoutHelper.getGBC(0, 0, 1, 1.0D)); // Session management combo box this.add(new JLabel(Constant.messages.getString("sessionmanagement.panel.label.typeSelect")), LayoutHelper.getGBC(0, 1, 1, 1.0D, new Insets(20, 0, 5, 5))); this.add(getSessionManagementMethodsComboBox(), LayoutHelper.getGBC(0, 2, 1, 1.0D)); // Method config panel container this.add(getConfigContainerPanel(), LayoutHelper.getGBC(0, 3, 1, 1.0d, new Insets(10, 0, 10, 0))); // Padding this.add(new JLabel(), LayoutHelper.getGBC(0, 99, 1, 1.0D, 1.0D)); }
class class_name[name] begin[{] method[initialize, return_type[void], modifier[private], parameter[]] begin[{] THIS[call[None.setLayout, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CardLayout, sub_type=None))]]] THIS[call[None.setName, parameter[binary_operation[binary_operation[call[.getContextIndex, parameter[]], +, literal[": "]], +, member[.PANEL_NAME]]]]] THIS[call[None.setLayout, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GridBagLayout, sub_type=None))]]] THIS[call[None.setBorder, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EmptyBorder, sub_type=None))]]] THIS[call[None.add, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="sessionmanagement.panel.label.description")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=Constant.messages, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None)), call[LayoutHelper.getGBC, parameter[literal[0], literal[0], literal[1], literal[1.0D]]]]]] THIS[call[None.add, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="sessionmanagement.panel.label.typeSelect")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=Constant.messages, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None)), call[LayoutHelper.getGBC, parameter[literal[0], literal[1], literal[1], literal[1.0D], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=20), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]]] THIS[call[None.add, parameter[call[.getSessionManagementMethodsComboBox, parameter[]], call[LayoutHelper.getGBC, parameter[literal[0], literal[2], literal[1], literal[1.0D]]]]]] THIS[call[None.add, parameter[call[.getConfigContainerPanel, parameter[]], call[LayoutHelper.getGBC, parameter[literal[0], literal[3], literal[1], literal[1.0d], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]]] THIS[call[None.add, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None)), call[LayoutHelper.getGBC, parameter[literal[0], literal[99], literal[1], literal[1.0D], literal[1.0D]]]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[initialize] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[CardLayout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[setName] operator[SEP] identifier[getContextIndex] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[PANEL_NAME] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[GridBagLayout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[setBorder] operator[SEP] Keyword[new] identifier[EmptyBorder] operator[SEP] Other[2] , Other[2] , Other[2] , Other[2] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JLabel] operator[SEP] identifier[Constant] operator[SEP] identifier[messages] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[0] , Other[1] , literal[Float] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JLabel] operator[SEP] identifier[Constant] operator[SEP] identifier[messages] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[1] , Other[1] , literal[Float] , Keyword[new] identifier[Insets] operator[SEP] Other[20] , Other[0] , Other[5] , Other[5] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[add] operator[SEP] identifier[getSessionManagementMethodsComboBox] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[2] , Other[1] , literal[Float] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[add] operator[SEP] identifier[getConfigContainerPanel] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[3] , Other[1] , literal[Float] , Keyword[new] identifier[Insets] operator[SEP] Other[10] , Other[0] , Other[10] , Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JLabel] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[99] , Other[1] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] }
private Map<Integer, Double> predict(final double[] x) { Map<Integer, Double> result = new HashMap<>(); for (int i = 0; i < model.weights.length; i++) { double y = VectorUtils.dotProduct(x, model.weights[i]); y += model.bias[i]; result.put(i, y); } return result; }
class class_name[name] begin[{] method[predict, return_type[type[Map]], modifier[private], parameter[x]] begin[{] local_variable[type[Map], result] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=weights, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=dotProduct, postfix_operators=[], prefix_operators=[], qualifier=VectorUtils, selectors=[], type_arguments=None), name=y)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=bias, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=model.weights, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.result]] end[}] END[}]
Keyword[private] identifier[Map] operator[<] identifier[Integer] , identifier[Double] operator[>] identifier[predict] operator[SEP] Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[x] operator[SEP] { identifier[Map] operator[<] identifier[Integer] , identifier[Double] operator[>] identifier[result] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[model] operator[SEP] identifier[weights] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[double] identifier[y] operator[=] identifier[VectorUtils] operator[SEP] identifier[dotProduct] operator[SEP] identifier[x] , identifier[model] operator[SEP] identifier[weights] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[y] operator[+=] identifier[model] operator[SEP] identifier[bias] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[put] operator[SEP] identifier[i] , identifier[y] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public void setupViews(Widget widget) { if (widget.getUiStyle() == Widget.STYLE_LIGHT) { int color = ContextCompat.getColor(getContext(), R.color.albumLoadingDark); mProgressBar.setColorFilter(color); } else { mProgressBar.setColorFilter(widget.getToolBarColor()); } }
class class_name[name] begin[{] method[setupViews, return_type[void], modifier[public], parameter[widget]] begin[{] if[binary_operation[call[widget.getUiStyle, parameter[]], ==, member[Widget.STYLE_LIGHT]]] begin[{] local_variable[type[int], color] call[mProgressBar.setColorFilter, parameter[member[.color]]] else begin[{] call[mProgressBar.setColorFilter, parameter[call[widget.getToolBarColor, parameter[]]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setupViews] operator[SEP] identifier[Widget] identifier[widget] operator[SEP] { Keyword[if] operator[SEP] identifier[widget] operator[SEP] identifier[getUiStyle] operator[SEP] operator[SEP] operator[==] identifier[Widget] operator[SEP] identifier[STYLE_LIGHT] operator[SEP] { Keyword[int] identifier[color] operator[=] identifier[ContextCompat] operator[SEP] identifier[getColor] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] , identifier[R] operator[SEP] identifier[color] operator[SEP] identifier[albumLoadingDark] operator[SEP] operator[SEP] identifier[mProgressBar] operator[SEP] identifier[setColorFilter] operator[SEP] identifier[color] operator[SEP] operator[SEP] } Keyword[else] { identifier[mProgressBar] operator[SEP] identifier[setColorFilter] operator[SEP] identifier[widget] operator[SEP] identifier[getToolBarColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public void saturate(IAtom atom, IAtomContainer ac) throws CDKException { logger.info("Saturating atom by adjusting lone pair electrons..."); IAtomType atomType = factory.getAtomType(atom.getAtomTypeName()); int lpCount = (Integer) atomType.getProperty(CDKConstants.LONE_PAIR_COUNT); int missingLPs = lpCount - ac.getConnectedLonePairsCount(atom); for (int j = 0; j < missingLPs; j++) { ILonePair lp = atom.getBuilder().newInstance(ILonePair.class, atom); ac.addLonePair(lp); } }
class class_name[name] begin[{] method[saturate, return_type[void], modifier[public], parameter[atom, ac]] begin[{] call[logger.info, parameter[literal["Saturating atom by adjusting lone pair electrons..."]]] local_variable[type[IAtomType], atomType] local_variable[type[int], lpCount] local_variable[type[int], missingLPs] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getBuilder, postfix_operators=[], prefix_operators=[], qualifier=atom, selectors=[MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ILonePair, sub_type=None)), MemberReference(member=atom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=lp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ILonePair, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addLonePair, postfix_operators=[], prefix_operators=[], qualifier=ac, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=missingLPs, 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) end[}] END[}]
Keyword[public] Keyword[void] identifier[saturate] operator[SEP] identifier[IAtom] identifier[atom] , identifier[IAtomContainer] identifier[ac] operator[SEP] Keyword[throws] identifier[CDKException] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[IAtomType] identifier[atomType] operator[=] identifier[factory] operator[SEP] identifier[getAtomType] operator[SEP] identifier[atom] operator[SEP] identifier[getAtomTypeName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[lpCount] operator[=] operator[SEP] identifier[Integer] operator[SEP] identifier[atomType] operator[SEP] identifier[getProperty] operator[SEP] identifier[CDKConstants] operator[SEP] identifier[LONE_PAIR_COUNT] operator[SEP] operator[SEP] Keyword[int] identifier[missingLPs] operator[=] identifier[lpCount] operator[-] identifier[ac] operator[SEP] identifier[getConnectedLonePairsCount] operator[SEP] identifier[atom] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[missingLPs] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[ILonePair] identifier[lp] operator[=] identifier[atom] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] identifier[ILonePair] operator[SEP] Keyword[class] , identifier[atom] operator[SEP] operator[SEP] identifier[ac] operator[SEP] identifier[addLonePair] operator[SEP] identifier[lp] operator[SEP] operator[SEP] } }
public void removeConnectionPool(URL url) { RequestBuilder req = new RequestBuilder(); req.host = url.getHost(); req.port = url.getPort() < 0 ? url.getDefaultPort() : url.getPort(); removePool(req); }
class class_name[name] begin[{] method[removeConnectionPool, return_type[void], modifier[public], parameter[url]] begin[{] local_variable[type[RequestBuilder], req] assign[member[req.host], call[url.getHost, parameter[]]] assign[member[req.port], TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPort, postfix_operators=[], prefix_operators=[], qualifier=url, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), if_false=MethodInvocation(arguments=[], member=getPort, postfix_operators=[], prefix_operators=[], qualifier=url, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[], member=getDefaultPort, postfix_operators=[], prefix_operators=[], qualifier=url, selectors=[], type_arguments=None))] call[.removePool, parameter[member[.req]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[removeConnectionPool] operator[SEP] identifier[URL] identifier[url] operator[SEP] { identifier[RequestBuilder] identifier[req] operator[=] Keyword[new] identifier[RequestBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[req] operator[SEP] identifier[host] operator[=] identifier[url] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] operator[SEP] identifier[req] operator[SEP] identifier[port] operator[=] identifier[url] operator[SEP] identifier[getPort] operator[SEP] operator[SEP] operator[<] Other[0] operator[?] identifier[url] operator[SEP] identifier[getDefaultPort] operator[SEP] operator[SEP] operator[:] identifier[url] operator[SEP] identifier[getPort] operator[SEP] operator[SEP] operator[SEP] identifier[removePool] operator[SEP] identifier[req] operator[SEP] operator[SEP] }
public void rotate(Quaternion rotation) { Transform3D m = new Transform3D(); m.transform(this.getFirstAxis()); m.transform(this.getSecondAxis()); m.transform(this.getThirdAxis()); this.setFirstAxisExtent(this.getFirstAxis().length()); this.setSecondAxisExtent(this.getSecondAxis().length()); this.setThirdAxisExtent(this.getThirdAxis().length()); this.getFirstAxis().normalize(); this.getSecondAxis().normalize(); this.getThirdAxis().normalize(); }
class class_name[name] begin[{] method[rotate, return_type[void], modifier[public], parameter[rotation]] begin[{] local_variable[type[Transform3D], m] call[m.transform, parameter[THIS[call[None.getFirstAxis, parameter[]]]]] call[m.transform, parameter[THIS[call[None.getSecondAxis, parameter[]]]]] call[m.transform, parameter[THIS[call[None.getThirdAxis, parameter[]]]]] THIS[call[None.setFirstAxisExtent, parameter[THIS[call[None.getFirstAxis, parameter[]]call[None.length, parameter[]]]]]] THIS[call[None.setSecondAxisExtent, parameter[THIS[call[None.getSecondAxis, parameter[]]call[None.length, parameter[]]]]]] THIS[call[None.setThirdAxisExtent, parameter[THIS[call[None.getThirdAxis, parameter[]]call[None.length, parameter[]]]]]] THIS[call[None.getFirstAxis, parameter[]]call[None.normalize, parameter[]]] THIS[call[None.getSecondAxis, parameter[]]call[None.normalize, parameter[]]] THIS[call[None.getThirdAxis, parameter[]]call[None.normalize, parameter[]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[rotate] operator[SEP] identifier[Quaternion] identifier[rotation] operator[SEP] { identifier[Transform3D] identifier[m] operator[=] Keyword[new] identifier[Transform3D] operator[SEP] operator[SEP] operator[SEP] identifier[m] operator[SEP] identifier[transform] operator[SEP] Keyword[this] operator[SEP] identifier[getFirstAxis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m] operator[SEP] identifier[transform] operator[SEP] Keyword[this] operator[SEP] identifier[getSecondAxis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m] operator[SEP] identifier[transform] operator[SEP] Keyword[this] operator[SEP] identifier[getThirdAxis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[setFirstAxisExtent] operator[SEP] Keyword[this] operator[SEP] identifier[getFirstAxis] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[setSecondAxisExtent] operator[SEP] Keyword[this] operator[SEP] identifier[getSecondAxis] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[setThirdAxisExtent] operator[SEP] Keyword[this] operator[SEP] identifier[getThirdAxis] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getFirstAxis] operator[SEP] operator[SEP] operator[SEP] identifier[normalize] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getSecondAxis] operator[SEP] operator[SEP] operator[SEP] identifier[normalize] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getThirdAxis] operator[SEP] operator[SEP] operator[SEP] identifier[normalize] operator[SEP] operator[SEP] operator[SEP] }
public WaterMeterIo createImpl() { WaterMeterIo obj = new WaterMeterIo(); PojoUtils.copyProperties(obj, this, PojoUtils.FieldNaming.CONSISTENT); return obj; }
class class_name[name] begin[{] method[createImpl, return_type[type[WaterMeterIo]], modifier[public], parameter[]] begin[{] local_variable[type[WaterMeterIo], obj] call[PojoUtils.copyProperties, parameter[member[.obj], THIS[], member[PojoUtils.FieldNaming.CONSISTENT]]] return[member[.obj]] end[}] END[}]
Keyword[public] identifier[WaterMeterIo] identifier[createImpl] operator[SEP] operator[SEP] { identifier[WaterMeterIo] identifier[obj] operator[=] Keyword[new] identifier[WaterMeterIo] operator[SEP] operator[SEP] operator[SEP] identifier[PojoUtils] operator[SEP] identifier[copyProperties] operator[SEP] identifier[obj] , Keyword[this] , identifier[PojoUtils] operator[SEP] identifier[FieldNaming] operator[SEP] identifier[CONSISTENT] operator[SEP] operator[SEP] Keyword[return] identifier[obj] operator[SEP] }
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WField field = (WField) component; XmlStringBuilder xml = renderContext.getWriter(); int inputWidth = field.getInputWidth(); xml.appendTagOpen("ui:field"); xml.appendAttribute("id", component.getId()); xml.appendOptionalAttribute("class", component.getHtmlClass()); xml.appendOptionalAttribute("track", component.isTracking(), "true"); xml.appendOptionalAttribute("hidden", field.isHidden(), "true"); xml.appendOptionalAttribute("inputWidth", inputWidth > 0, inputWidth); xml.appendClose(); // Label WLabel label = field.getLabel(); if (label != null) { label.paint(renderContext); } // Field if (field.getField() != null) { xml.appendTag("ui:input"); field.getField().paint(renderContext); if (field.getErrorIndicator() != null) { field.getErrorIndicator().paint(renderContext); } if (field.getWarningIndicator() != null) { field.getWarningIndicator().paint(renderContext); } xml.appendEndTag("ui:input"); } xml.appendEndTag("ui:field"); }
class class_name[name] begin[{] method[doRender, return_type[void], modifier[public], parameter[component, renderContext]] begin[{] local_variable[type[WField], field] local_variable[type[XmlStringBuilder], xml] local_variable[type[int], inputWidth] call[xml.appendTagOpen, parameter[literal["ui:field"]]] call[xml.appendAttribute, parameter[literal["id"], call[component.getId, parameter[]]]] call[xml.appendOptionalAttribute, parameter[literal["class"], call[component.getHtmlClass, parameter[]]]] call[xml.appendOptionalAttribute, parameter[literal["track"], call[component.isTracking, parameter[]], literal["true"]]] call[xml.appendOptionalAttribute, parameter[literal["hidden"], call[field.isHidden, parameter[]], literal["true"]]] call[xml.appendOptionalAttribute, parameter[literal["inputWidth"], binary_operation[member[.inputWidth], >, literal[0]], member[.inputWidth]]] call[xml.appendClose, parameter[]] local_variable[type[WLabel], label] if[binary_operation[member[.label], !=, literal[null]]] begin[{] call[label.paint, parameter[member[.renderContext]]] else begin[{] None end[}] if[binary_operation[call[field.getField, parameter[]], !=, literal[null]]] begin[{] call[xml.appendTag, parameter[literal["ui:input"]]] call[field.getField, parameter[]] if[binary_operation[call[field.getErrorIndicator, parameter[]], !=, literal[null]]] begin[{] call[field.getErrorIndicator, parameter[]] else begin[{] None end[}] if[binary_operation[call[field.getWarningIndicator, parameter[]], !=, literal[null]]] begin[{] call[field.getWarningIndicator, parameter[]] else begin[{] None end[}] call[xml.appendEndTag, parameter[literal["ui:input"]]] else begin[{] None end[}] call[xml.appendEndTag, parameter[literal["ui:field"]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[doRender] operator[SEP] Keyword[final] identifier[WComponent] identifier[component] , Keyword[final] identifier[WebXmlRenderContext] identifier[renderContext] operator[SEP] { identifier[WField] identifier[field] operator[=] operator[SEP] identifier[WField] operator[SEP] identifier[component] operator[SEP] identifier[XmlStringBuilder] identifier[xml] operator[=] identifier[renderContext] operator[SEP] identifier[getWriter] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[inputWidth] operator[=] identifier[field] operator[SEP] identifier[getInputWidth] operator[SEP] operator[SEP] operator[SEP] identifier[xml] operator[SEP] identifier[appendTagOpen] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[xml] operator[SEP] identifier[appendAttribute] operator[SEP] literal[String] , identifier[component] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[xml] operator[SEP] identifier[appendOptionalAttribute] operator[SEP] literal[String] , identifier[component] operator[SEP] identifier[getHtmlClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[xml] operator[SEP] identifier[appendOptionalAttribute] operator[SEP] literal[String] , identifier[component] operator[SEP] identifier[isTracking] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[xml] operator[SEP] identifier[appendOptionalAttribute] operator[SEP] literal[String] , identifier[field] operator[SEP] identifier[isHidden] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[xml] operator[SEP] identifier[appendOptionalAttribute] operator[SEP] literal[String] , identifier[inputWidth] operator[>] Other[0] , identifier[inputWidth] operator[SEP] operator[SEP] identifier[xml] operator[SEP] identifier[appendClose] operator[SEP] operator[SEP] operator[SEP] identifier[WLabel] identifier[label] operator[=] identifier[field] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[label] operator[!=] Other[null] operator[SEP] { identifier[label] operator[SEP] identifier[paint] operator[SEP] identifier[renderContext] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[field] operator[SEP] identifier[getField] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[xml] operator[SEP] identifier[appendTag] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[getField] operator[SEP] operator[SEP] operator[SEP] identifier[paint] operator[SEP] identifier[renderContext] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[field] operator[SEP] identifier[getErrorIndicator] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[field] operator[SEP] identifier[getErrorIndicator] operator[SEP] operator[SEP] operator[SEP] identifier[paint] operator[SEP] identifier[renderContext] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[field] operator[SEP] identifier[getWarningIndicator] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[field] operator[SEP] identifier[getWarningIndicator] operator[SEP] operator[SEP] operator[SEP] identifier[paint] operator[SEP] identifier[renderContext] operator[SEP] operator[SEP] } identifier[xml] operator[SEP] identifier[appendEndTag] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[xml] operator[SEP] identifier[appendEndTag] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public ParameterRanges withIntegerParameterRanges(IntegerParameterRange... integerParameterRanges) { if (this.integerParameterRanges == null) { setIntegerParameterRanges(new java.util.ArrayList<IntegerParameterRange>(integerParameterRanges.length)); } for (IntegerParameterRange ele : integerParameterRanges) { this.integerParameterRanges.add(ele); } return this; }
class class_name[name] begin[{] method[withIntegerParameterRanges, return_type[type[ParameterRanges]], modifier[public], parameter[integerParameterRanges]] begin[{] if[binary_operation[THIS[member[None.integerParameterRanges]], ==, literal[null]]] begin[{] call[.setIntegerParameterRanges, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=integerParameterRanges, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IntegerParameterRange, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=integerParameterRanges, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=integerParameterRanges, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IntegerParameterRange, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[ParameterRanges] identifier[withIntegerParameterRanges] operator[SEP] identifier[IntegerParameterRange] operator[...] identifier[integerParameterRanges] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[integerParameterRanges] operator[==] Other[null] operator[SEP] { identifier[setIntegerParameterRanges] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[IntegerParameterRange] operator[>] operator[SEP] identifier[integerParameterRanges] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[IntegerParameterRange] identifier[ele] operator[:] identifier[integerParameterRanges] operator[SEP] { Keyword[this] operator[SEP] identifier[integerParameterRanges] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public Plan createQueryPlan(String qry, Transaction tx) { Parser parser = new Parser(qry); QueryData data = parser.queryCommand(); Verifier.verifyQueryData(data, tx); return qPlanner.createPlan(data, tx); }
class class_name[name] begin[{] method[createQueryPlan, return_type[type[Plan]], modifier[public], parameter[qry, tx]] begin[{] local_variable[type[Parser], parser] local_variable[type[QueryData], data] call[Verifier.verifyQueryData, parameter[member[.data], member[.tx]]] return[call[qPlanner.createPlan, parameter[member[.data], member[.tx]]]] end[}] END[}]
Keyword[public] identifier[Plan] identifier[createQueryPlan] operator[SEP] identifier[String] identifier[qry] , identifier[Transaction] identifier[tx] operator[SEP] { identifier[Parser] identifier[parser] operator[=] Keyword[new] identifier[Parser] operator[SEP] identifier[qry] operator[SEP] operator[SEP] identifier[QueryData] identifier[data] operator[=] identifier[parser] operator[SEP] identifier[queryCommand] operator[SEP] operator[SEP] operator[SEP] identifier[Verifier] operator[SEP] identifier[verifyQueryData] operator[SEP] identifier[data] , identifier[tx] operator[SEP] operator[SEP] Keyword[return] identifier[qPlanner] operator[SEP] identifier[createPlan] operator[SEP] identifier[data] , identifier[tx] operator[SEP] operator[SEP] }
public static CmsXmlPage unmarshal(String xmlData, String encoding, EntityResolver resolver) throws CmsXmlException { return new CmsXmlPage(CmsXmlUtils.unmarshalHelper(xmlData, resolver), encoding); }
class class_name[name] begin[{] method[unmarshal, return_type[type[CmsXmlPage]], modifier[public static], parameter[xmlData, encoding, resolver]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=xmlData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resolver, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unmarshalHelper, postfix_operators=[], prefix_operators=[], qualifier=CmsXmlUtils, selectors=[], type_arguments=None), MemberReference(member=encoding, 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=CmsXmlPage, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[CmsXmlPage] identifier[unmarshal] operator[SEP] identifier[String] identifier[xmlData] , identifier[String] identifier[encoding] , identifier[EntityResolver] identifier[resolver] operator[SEP] Keyword[throws] identifier[CmsXmlException] { Keyword[return] Keyword[new] identifier[CmsXmlPage] operator[SEP] identifier[CmsXmlUtils] operator[SEP] identifier[unmarshalHelper] operator[SEP] identifier[xmlData] , identifier[resolver] operator[SEP] , identifier[encoding] operator[SEP] operator[SEP] }
protected void cleanRow() { int i = 0; while(i < this.cells.size()) { if(((RtfCell) this.cells.get(i)).isDeleted()) { this.cells.remove(i); } else { i++; } } }
class class_name[name] begin[{] method[cleanRow, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[int], i] while[binary_operation[member[.i], <, THIS[member[None.cells]call[None.size, parameter[]]]]] begin[{] if[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=cells, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=RtfCell, sub_type=None))] begin[{] THIS[member[None.cells]call[None.remove, parameter[member[.i]]]] else begin[{] member[.i] end[}] end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[cleanRow] operator[SEP] operator[SEP] { Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[<] Keyword[this] operator[SEP] identifier[cells] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[RtfCell] operator[SEP] Keyword[this] operator[SEP] identifier[cells] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[isDeleted] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[cells] operator[SEP] identifier[remove] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[else] { identifier[i] operator[++] operator[SEP] } } }
private boolean hasChanges(final Map<URI, URI> changeTable) { if (changeTable.isEmpty()) { return false; } for (Map.Entry<URI, URI> e : changeTable.entrySet()) { if (!e.getKey().equals(e.getValue())) { return true; } } return false; }
class class_name[name] begin[{] method[hasChanges, return_type[type[boolean]], modifier[private], parameter[changeTable]] begin[{] if[call[changeTable.isEmpty, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=['!'], qualifier=e, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], 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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=changeTable, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) return[literal[false]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[hasChanges] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[URI] , identifier[URI] operator[>] identifier[changeTable] operator[SEP] { Keyword[if] operator[SEP] identifier[changeTable] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[URI] , identifier[URI] operator[>] identifier[e] operator[:] identifier[changeTable] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[e] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[e] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
private void paintBorderEnabled(Graphics2D g, int width, int height) { Shape s; s = shapeGenerator.createRoundRectangle(0, 0, width - 1, height - 1, CornerSize.BORDER); g.setPaint(borderColor); g.draw(s); }
class class_name[name] begin[{] method[paintBorderEnabled, return_type[void], modifier[private], parameter[g, width, height]] begin[{] local_variable[type[Shape], s] assign[member[.s], call[shapeGenerator.createRoundRectangle, parameter[literal[0], literal[0], binary_operation[member[.width], -, literal[1]], binary_operation[member[.height], -, literal[1]], member[CornerSize.BORDER]]]] call[g.setPaint, parameter[member[.borderColor]]] call[g.draw, parameter[member[.s]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[paintBorderEnabled] operator[SEP] identifier[Graphics2D] identifier[g] , Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] { identifier[Shape] identifier[s] operator[SEP] identifier[s] operator[=] identifier[shapeGenerator] operator[SEP] identifier[createRoundRectangle] operator[SEP] Other[0] , Other[0] , identifier[width] operator[-] Other[1] , identifier[height] operator[-] Other[1] , identifier[CornerSize] operator[SEP] identifier[BORDER] operator[SEP] operator[SEP] identifier[g] operator[SEP] identifier[setPaint] operator[SEP] identifier[borderColor] operator[SEP] operator[SEP] identifier[g] operator[SEP] identifier[draw] operator[SEP] identifier[s] operator[SEP] operator[SEP] }
boolean isCornerValidOrigin( Node candidate ) { candidate.putEdgesIntoList(edgeList); if( edgeList.size() != 2 ) { throw new RuntimeException("BUG! Should be a corner and have two edges"); } Node a = edgeList.get(0); Node b = edgeList.get(1); // Find the average angle from the two vectors defined by the two connected nodes double dirA = Math.atan2(a.y-candidate.y, a.x-candidate.x); double dirB = Math.atan2(b.y-candidate.y, b.x-candidate.x); double dirAB = UtilAngle.boundHalf(dirA+UtilAngle.distanceCCW(dirA,dirB)/2.0); // Find the acute angle between the corner's orientation and the vector double acute = UtilAngle.distHalf(dirAB,candidate.orientation); return acute < Math.PI/4.0; }
class class_name[name] begin[{] method[isCornerValidOrigin, return_type[type[boolean]], modifier[default], parameter[candidate]] begin[{] call[candidate.putEdgesIntoList, parameter[member[.edgeList]]] if[binary_operation[call[edgeList.size, parameter[]], !=, literal[2]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BUG! Should be a corner and have two edges")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Node], a] local_variable[type[Node], b] local_variable[type[double], dirA] local_variable[type[double], dirB] local_variable[type[double], dirAB] local_variable[type[double], acute] return[binary_operation[member[.acute], <, binary_operation[member[Math.PI], /, literal[4.0]]]] end[}] END[}]
Keyword[boolean] identifier[isCornerValidOrigin] operator[SEP] identifier[Node] identifier[candidate] operator[SEP] { identifier[candidate] operator[SEP] identifier[putEdgesIntoList] operator[SEP] identifier[edgeList] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[edgeList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[!=] Other[2] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Node] identifier[a] operator[=] identifier[edgeList] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[Node] identifier[b] operator[=] identifier[edgeList] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[double] identifier[dirA] operator[=] identifier[Math] operator[SEP] identifier[atan2] operator[SEP] identifier[a] operator[SEP] identifier[y] operator[-] identifier[candidate] operator[SEP] identifier[y] , identifier[a] operator[SEP] identifier[x] operator[-] identifier[candidate] operator[SEP] identifier[x] operator[SEP] operator[SEP] Keyword[double] identifier[dirB] operator[=] identifier[Math] operator[SEP] identifier[atan2] operator[SEP] identifier[b] operator[SEP] identifier[y] operator[-] identifier[candidate] operator[SEP] identifier[y] , identifier[b] operator[SEP] identifier[x] operator[-] identifier[candidate] operator[SEP] identifier[x] operator[SEP] operator[SEP] Keyword[double] identifier[dirAB] operator[=] identifier[UtilAngle] operator[SEP] identifier[boundHalf] operator[SEP] identifier[dirA] operator[+] identifier[UtilAngle] operator[SEP] identifier[distanceCCW] operator[SEP] identifier[dirA] , identifier[dirB] operator[SEP] operator[/] literal[Float] operator[SEP] operator[SEP] Keyword[double] identifier[acute] operator[=] identifier[UtilAngle] operator[SEP] identifier[distHalf] operator[SEP] identifier[dirAB] , identifier[candidate] operator[SEP] identifier[orientation] operator[SEP] operator[SEP] Keyword[return] identifier[acute] operator[<] identifier[Math] operator[SEP] identifier[PI] operator[/] literal[Float] operator[SEP] }
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "lineStringProperty") public JAXBElement<LineStringPropertyType> createLineStringProperty(LineStringPropertyType value) { return new JAXBElement<LineStringPropertyType>(_LineStringProperty_QNAME, LineStringPropertyType.class, null, value); }
class class_name[name] begin[{] method[createLineStringProperty, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_LineStringProperty_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LineStringPropertyType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=LineStringPropertyType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[LineStringPropertyType] operator[>] identifier[createLineStringProperty] operator[SEP] identifier[LineStringPropertyType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[LineStringPropertyType] operator[>] operator[SEP] identifier[_LineStringProperty_QNAME] , identifier[LineStringPropertyType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
public static void write(final Iterable<HighScoringPair> hsps, final PrintWriter writer) { checkNotNull(hsps); checkNotNull(writer); for (HighScoringPair hsp : hsps) { writer.println(hsp.toString()); } }
class class_name[name] begin[{] method[write, return_type[void], modifier[public static], parameter[hsps, writer]] begin[{] call[.checkNotNull, parameter[member[.hsps]]] call[.checkNotNull, parameter[member[.writer]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=hsp, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=hsps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=hsp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HighScoringPair, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[write] operator[SEP] Keyword[final] identifier[Iterable] operator[<] identifier[HighScoringPair] operator[>] identifier[hsps] , Keyword[final] identifier[PrintWriter] identifier[writer] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[hsps] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[writer] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[HighScoringPair] identifier[hsp] operator[:] identifier[hsps] operator[SEP] { identifier[writer] operator[SEP] identifier[println] operator[SEP] identifier[hsp] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public void setEventDestinations(java.util.Collection<EventDestination> eventDestinations) { if (eventDestinations == null) { this.eventDestinations = null; return; } this.eventDestinations = new java.util.ArrayList<EventDestination>(eventDestinations); }
class class_name[name] begin[{] method[setEventDestinations, return_type[void], modifier[public], parameter[eventDestinations]] begin[{] if[binary_operation[member[.eventDestinations], ==, literal[null]]] begin[{] assign[THIS[member[None.eventDestinations]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.eventDestinations]], ClassCreator(arguments=[MemberReference(member=eventDestinations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=EventDestination, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setEventDestinations] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[EventDestination] operator[>] identifier[eventDestinations] operator[SEP] { Keyword[if] operator[SEP] identifier[eventDestinations] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[eventDestinations] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[eventDestinations] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[EventDestination] operator[>] operator[SEP] identifier[eventDestinations] operator[SEP] operator[SEP] }
public static void run(String[] command) throws IOException, RDF4JException, TrustyUriException { String cmd = command[0]; String[] cmdArgs = Arrays.copyOfRange(command, 1, command.length); if (cmd.equals("CheckFile")) { CheckFile.main(cmdArgs); } else if (cmd.equals("ProcessFile")) { ProcessFile.main(cmdArgs); } else if (cmd.equals("CheckLargeRdf")) { CheckLargeRdf.main(cmdArgs); } else if (cmd.equals("TransformRdf")) { TransformRdf.main(cmdArgs); } else if (cmd.equals("TransformLargeRdf")) { TransformLargeRdf.main(cmdArgs); } else if (cmd.equals("CheckSortedRdf")) { CheckSortedRdf.main(cmdArgs); } else { System.err.println("ERROR: Unrecognized command " + cmd); System.exit(1); } }
class class_name[name] begin[{] method[run, return_type[void], modifier[public static], parameter[command]] begin[{] local_variable[type[String], cmd] local_variable[type[String], cmdArgs] if[call[cmd.equals, parameter[literal["CheckFile"]]]] begin[{] call[CheckFile.main, parameter[member[.cmdArgs]]] else begin[{] if[call[cmd.equals, parameter[literal["ProcessFile"]]]] begin[{] call[ProcessFile.main, parameter[member[.cmdArgs]]] else begin[{] if[call[cmd.equals, parameter[literal["CheckLargeRdf"]]]] begin[{] call[CheckLargeRdf.main, parameter[member[.cmdArgs]]] else begin[{] if[call[cmd.equals, parameter[literal["TransformRdf"]]]] begin[{] call[TransformRdf.main, parameter[member[.cmdArgs]]] else begin[{] if[call[cmd.equals, parameter[literal["TransformLargeRdf"]]]] begin[{] call[TransformLargeRdf.main, parameter[member[.cmdArgs]]] else begin[{] if[call[cmd.equals, parameter[literal["CheckSortedRdf"]]]] begin[{] call[CheckSortedRdf.main, parameter[member[.cmdArgs]]] else begin[{] call[System.err.println, parameter[binary_operation[literal["ERROR: Unrecognized command "], +, member[.cmd]]]] call[System.exit, parameter[literal[1]]] end[}] end[}] end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[run] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[command] operator[SEP] Keyword[throws] identifier[IOException] , identifier[RDF4JException] , identifier[TrustyUriException] { identifier[String] identifier[cmd] operator[=] identifier[command] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[cmdArgs] operator[=] identifier[Arrays] operator[SEP] identifier[copyOfRange] operator[SEP] identifier[command] , Other[1] , identifier[command] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cmd] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[CheckFile] operator[SEP] identifier[main] operator[SEP] identifier[cmdArgs] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cmd] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[ProcessFile] operator[SEP] identifier[main] operator[SEP] identifier[cmdArgs] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cmd] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[CheckLargeRdf] operator[SEP] identifier[main] operator[SEP] identifier[cmdArgs] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cmd] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[TransformRdf] operator[SEP] identifier[main] operator[SEP] identifier[cmdArgs] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cmd] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[TransformLargeRdf] operator[SEP] identifier[main] operator[SEP] identifier[cmdArgs] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cmd] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[CheckSortedRdf] operator[SEP] identifier[main] operator[SEP] identifier[cmdArgs] operator[SEP] operator[SEP] } Keyword[else] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[cmd] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[exit] operator[SEP] Other[1] operator[SEP] operator[SEP] } }
protected void computeVariablesFromObject(MtasParserObject object, Map<String, List<MtasParserObject>> currentList, Map<String, Map<String, String>> variables) { MtasParserType<MtasParserVariable> parserType = object.getType(); String id = object.getId(); if (id != null) { for (MtasParserVariable variable : parserType.getItems()) { if (!variables.containsKey(variable.variable)) { variables.put(variable.variable, new HashMap<String, String>()); } StringBuilder builder = new StringBuilder(); for (MtasParserVariableValue variableValue : variable.values) { if (variableValue.type.equals("attribute")) { String subValue = object.getAttribute(variableValue.name); if (subValue != null) { builder.append(subValue); } } } variables.get(variable.variable).put(id, builder.toString()); } } }
class class_name[name] begin[{] method[computeVariablesFromObject, return_type[void], modifier[protected], parameter[object, currentList, variables]] begin[{] local_variable[type[MtasParserType], parserType] local_variable[type[String], id] if[binary_operation[member[.id], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=variable, postfix_operators=[], prefix_operators=[], qualifier=variable, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=['!'], qualifier=variables, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=variable, postfix_operators=[], prefix_operators=[], qualifier=variable, selectors=[]), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=variables, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None)), name=builder)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="attribute")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=variableValue.type, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=variableValue, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=object, selectors=[], type_arguments=None), name=subValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=subValue, 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=subValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=variable, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=variableValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MtasParserVariableValue, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=variable, postfix_operators=[], prefix_operators=[], qualifier=variable, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=variables, selectors=[MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None)], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getItems, postfix_operators=[], prefix_operators=[], qualifier=parserType, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=variable)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MtasParserVariable, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[computeVariablesFromObject] operator[SEP] identifier[MtasParserObject] identifier[object] , identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[MtasParserObject] operator[>] operator[>] identifier[currentList] , identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[>] identifier[variables] operator[SEP] { identifier[MtasParserType] operator[<] identifier[MtasParserVariable] operator[>] identifier[parserType] operator[=] identifier[object] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[id] operator[=] identifier[object] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[id] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[MtasParserVariable] identifier[variable] operator[:] identifier[parserType] operator[SEP] identifier[getItems] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[variables] operator[SEP] identifier[containsKey] operator[SEP] identifier[variable] operator[SEP] identifier[variable] operator[SEP] operator[SEP] { identifier[variables] operator[SEP] identifier[put] operator[SEP] identifier[variable] operator[SEP] identifier[variable] , Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[MtasParserVariableValue] identifier[variableValue] operator[:] identifier[variable] operator[SEP] identifier[values] operator[SEP] { Keyword[if] operator[SEP] identifier[variableValue] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[String] identifier[subValue] operator[=] identifier[object] operator[SEP] identifier[getAttribute] operator[SEP] identifier[variableValue] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[subValue] operator[!=] Other[null] operator[SEP] { identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[subValue] operator[SEP] operator[SEP] } } } identifier[variables] operator[SEP] identifier[get] operator[SEP] identifier[variable] operator[SEP] identifier[variable] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[id] , identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
public MultiMap merge(MultiMap multiMap) { MultiMap result = new MultiMap(); result.map.putAll(this.map); result.map.putAll(multiMap.map); return result; }
class class_name[name] begin[{] method[merge, return_type[type[MultiMap]], modifier[public], parameter[multiMap]] begin[{] local_variable[type[MultiMap], result] call[result.map.putAll, parameter[THIS[member[None.map]]]] call[result.map.putAll, parameter[member[multiMap.map]]] return[member[.result]] end[}] END[}]
Keyword[public] identifier[MultiMap] identifier[merge] operator[SEP] identifier[MultiMap] identifier[multiMap] operator[SEP] { identifier[MultiMap] identifier[result] operator[=] Keyword[new] identifier[MultiMap] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[map] operator[SEP] identifier[putAll] operator[SEP] Keyword[this] operator[SEP] identifier[map] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[map] operator[SEP] identifier[putAll] operator[SEP] identifier[multiMap] operator[SEP] identifier[map] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public static <T1, T2, T3, T4, T5, T6, R> Supplier<R> partial6(final T1 t1, final T2 t2, final T3 t3, final T4 t4, final T5 t5, final T6 t6, final Function6<T1, T2, T3, T4, T5, T6, R> hexFunc) { return () -> hexFunc.apply(t1, t2, t3, t4, t5, t6); }
class class_name[name] begin[{] method[partial6, return_type[type[Supplier]], modifier[public static], parameter[t1, t2, t3, t4, t5, t6, hexFunc]] begin[{] return[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=t1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=hexFunc, selectors=[], type_arguments=None), parameters=[])] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T1] , identifier[T2] , identifier[T3] , identifier[T4] , identifier[T5] , identifier[T6] , identifier[R] operator[>] identifier[Supplier] operator[<] identifier[R] operator[>] identifier[partial6] operator[SEP] Keyword[final] identifier[T1] identifier[t1] , Keyword[final] identifier[T2] identifier[t2] , Keyword[final] identifier[T3] identifier[t3] , Keyword[final] identifier[T4] identifier[t4] , Keyword[final] identifier[T5] identifier[t5] , Keyword[final] identifier[T6] identifier[t6] , Keyword[final] identifier[Function6] operator[<] identifier[T1] , identifier[T2] , identifier[T3] , identifier[T4] , identifier[T5] , identifier[T6] , identifier[R] operator[>] identifier[hexFunc] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] operator[->] identifier[hexFunc] operator[SEP] identifier[apply] operator[SEP] identifier[t1] , identifier[t2] , identifier[t3] , identifier[t4] , identifier[t5] , identifier[t6] operator[SEP] operator[SEP] }
@Override public UpdatePullRequestDescriptionResult updatePullRequestDescription(UpdatePullRequestDescriptionRequest request) { request = beforeClientExecution(request); return executeUpdatePullRequestDescription(request); }
class class_name[name] begin[{] method[updatePullRequestDescription, return_type[type[UpdatePullRequestDescriptionResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeUpdatePullRequestDescription, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[UpdatePullRequestDescriptionResult] identifier[updatePullRequestDescription] operator[SEP] identifier[UpdatePullRequestDescriptionRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeUpdatePullRequestDescription] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public List<Class<?>> getRawTypes(List<DomainObjectType> types) { List<Class<?>> resultList = new ArrayList<Class<?>>(); for (DomainObjectType type : types) { resultList.add(type.getType()); } return resultList; }
class class_name[name] begin[{] method[getRawTypes, return_type[type[List]], modifier[public], parameter[types]] begin[{] local_variable[type[List], resultList] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=resultList, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=type)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DomainObjectType, sub_type=None))), label=None) return[member[.resultList]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[getRawTypes] operator[SEP] identifier[List] operator[<] identifier[DomainObjectType] operator[>] identifier[types] operator[SEP] { identifier[List] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[resultList] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[DomainObjectType] identifier[type] operator[:] identifier[types] operator[SEP] { identifier[resultList] operator[SEP] identifier[add] operator[SEP] identifier[type] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[resultList] operator[SEP] }
protected void persistJoinTableByCql(JoinTableData joinTableData, Cassandra.Client conn) { String joinTableName = joinTableData.getJoinTableName(); String invJoinColumnName = joinTableData.getInverseJoinColumnName(); Map<Object, Set<Object>> joinTableRecords = joinTableData.getJoinTableRecords(); EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, joinTableData.getEntityClass()); // need to bring in an insert query for this // add columns & execute query CQLTranslator translator = new CQLTranslator(); String batch_Query = CQLTranslator.BATCH_QUERY; String insert_Query = translator.INSERT_QUERY; StringBuilder builder = new StringBuilder(); builder.append(CQLTranslator.DEFAULT_KEY_NAME); builder.append(CQLTranslator.COMMA_STR); builder.append(translator.ensureCase(new StringBuilder(), joinTableData.getJoinColumnName(), false)); builder.append(CQLTranslator.COMMA_STR); builder.append(translator.ensureCase(new StringBuilder(), joinTableData.getInverseJoinColumnName(), false)); insert_Query = StringUtils.replace(insert_Query, CQLTranslator.COLUMN_FAMILY, translator.ensureCase(new StringBuilder(), joinTableName, false).toString()); insert_Query = StringUtils.replace(insert_Query, CQLTranslator.COLUMNS, builder.toString()); StringBuilder columnValueBuilder = new StringBuilder(); StringBuilder statements = new StringBuilder(); // insert query for each row key for (Object key : joinTableRecords.keySet()) { PropertyAccessor accessor = PropertyAccessorFactory.getPropertyAccessor((Field) entityMetadata.getIdAttribute().getJavaMember()); Set<Object> values = joinTableRecords.get(key); // join column value for (Object value : values) { if (value != null) { String insertQuery = insert_Query; columnValueBuilder.append(CQLTranslator.QUOTE_STR); columnValueBuilder.append( PropertyAccessorHelper.getString(key) + "\001" + PropertyAccessorHelper.getString(value)); columnValueBuilder.append(CQLTranslator.QUOTE_STR); columnValueBuilder.append(CQLTranslator.COMMA_STR); translator.appendValue(columnValueBuilder, key.getClass(), key, true, false); columnValueBuilder.append(CQLTranslator.COMMA_STR); translator.appendValue(columnValueBuilder, value.getClass(), value, true, false); insertQuery = StringUtils.replace(insertQuery, CQLTranslator.COLUMN_VALUES, columnValueBuilder.toString()); statements.append(insertQuery); statements.append(" "); } } } if (!StringUtils.isBlank(statements.toString())) { batch_Query = StringUtils.replace(batch_Query, CQLTranslator.STATEMENT, statements.toString()); StringBuilder batchBuilder = new StringBuilder(); batchBuilder.append(batch_Query); batchBuilder.append(CQLTranslator.APPLY_BATCH); execute(batchBuilder.toString(), conn); } }
class class_name[name] begin[{] method[persistJoinTableByCql, return_type[void], modifier[protected], parameter[joinTableData, conn]] begin[{] local_variable[type[String], joinTableName] local_variable[type[String], invJoinColumnName] local_variable[type[Map], joinTableRecords] local_variable[type[EntityMetadata], entityMetadata] local_variable[type[CQLTranslator], translator] local_variable[type[String], batch_Query] local_variable[type[String], insert_Query] local_variable[type[StringBuilder], builder] call[builder.append, parameter[member[CQLTranslator.DEFAULT_KEY_NAME]]] call[builder.append, parameter[member[CQLTranslator.COMMA_STR]]] call[builder.append, parameter[call[translator.ensureCase, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None)), call[joinTableData.getJoinColumnName, parameter[]], literal[false]]]]] call[builder.append, parameter[member[CQLTranslator.COMMA_STR]]] call[builder.append, parameter[call[translator.ensureCase, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None)), call[joinTableData.getInverseJoinColumnName, parameter[]], literal[false]]]]] assign[member[.insert_Query], call[StringUtils.replace, parameter[member[.insert_Query], member[CQLTranslator.COLUMN_FAMILY], call[translator.ensureCase, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None)), member[.joinTableName], literal[false]]]]]] assign[member[.insert_Query], call[StringUtils.replace, parameter[member[.insert_Query], member[CQLTranslator.COLUMNS], call[builder.toString, parameter[]]]]] local_variable[type[StringBuilder], columnValueBuilder] local_variable[type[StringBuilder], statements] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=getIdAttribute, postfix_operators=[], prefix_operators=[], qualifier=entityMetadata, selectors=[MethodInvocation(arguments=[], member=getJavaMember, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))], member=getPropertyAccessor, postfix_operators=[], prefix_operators=[], qualifier=PropertyAccessorFactory, selectors=[], type_arguments=None), name=accessor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PropertyAccessor, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=joinTableRecords, selectors=[], type_arguments=None), name=values)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Set, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=insert_Query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=insertQuery)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=QUOTE_STR, postfix_operators=[], prefix_operators=[], qualifier=CQLTranslator, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=columnValueBuilder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=PropertyAccessorHelper, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\001"), operator=+), operandr=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=PropertyAccessorHelper, selectors=[], type_arguments=None), operator=+)], member=append, postfix_operators=[], prefix_operators=[], qualifier=columnValueBuilder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=QUOTE_STR, postfix_operators=[], prefix_operators=[], qualifier=CQLTranslator, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=columnValueBuilder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=COMMA_STR, postfix_operators=[], prefix_operators=[], qualifier=CQLTranslator, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=columnValueBuilder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=columnValueBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=appendValue, postfix_operators=[], prefix_operators=[], qualifier=translator, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=COMMA_STR, postfix_operators=[], prefix_operators=[], qualifier=CQLTranslator, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=columnValueBuilder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=columnValueBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=appendValue, postfix_operators=[], prefix_operators=[], qualifier=translator, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=insertQuery, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=insertQuery, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=COLUMN_VALUES, postfix_operators=[], prefix_operators=[], qualifier=CQLTranslator, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=columnValueBuilder, selectors=[], type_arguments=None)], member=replace, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=insertQuery, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=statements, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=statements, 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=Object, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=joinTableRecords, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) if[call[StringUtils.isBlank, parameter[call[statements.toString, parameter[]]]]] begin[{] assign[member[.batch_Query], call[StringUtils.replace, parameter[member[.batch_Query], member[CQLTranslator.STATEMENT], call[statements.toString, parameter[]]]]] local_variable[type[StringBuilder], batchBuilder] call[batchBuilder.append, parameter[member[.batch_Query]]] call[batchBuilder.append, parameter[member[CQLTranslator.APPLY_BATCH]]] call[.execute, parameter[call[batchBuilder.toString, parameter[]], member[.conn]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[persistJoinTableByCql] operator[SEP] identifier[JoinTableData] identifier[joinTableData] , identifier[Cassandra] operator[SEP] identifier[Client] identifier[conn] operator[SEP] { identifier[String] identifier[joinTableName] operator[=] identifier[joinTableData] operator[SEP] identifier[getJoinTableName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[invJoinColumnName] operator[=] identifier[joinTableData] operator[SEP] identifier[getInverseJoinColumnName] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[Object] , identifier[Set] operator[<] identifier[Object] operator[>] operator[>] identifier[joinTableRecords] operator[=] identifier[joinTableData] operator[SEP] identifier[getJoinTableRecords] operator[SEP] operator[SEP] operator[SEP] identifier[EntityMetadata] identifier[entityMetadata] operator[=] identifier[KunderaMetadataManager] operator[SEP] identifier[getEntityMetadata] operator[SEP] identifier[kunderaMetadata] , identifier[joinTableData] operator[SEP] identifier[getEntityClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[CQLTranslator] identifier[translator] operator[=] Keyword[new] identifier[CQLTranslator] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[batch_Query] operator[=] identifier[CQLTranslator] operator[SEP] identifier[BATCH_QUERY] operator[SEP] identifier[String] identifier[insert_Query] operator[=] identifier[translator] operator[SEP] identifier[INSERT_QUERY] operator[SEP] identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[CQLTranslator] operator[SEP] identifier[DEFAULT_KEY_NAME] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[CQLTranslator] operator[SEP] identifier[COMMA_STR] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[translator] operator[SEP] identifier[ensureCase] operator[SEP] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] , identifier[joinTableData] operator[SEP] identifier[getJoinColumnName] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[CQLTranslator] operator[SEP] identifier[COMMA_STR] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[translator] operator[SEP] identifier[ensureCase] operator[SEP] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] , identifier[joinTableData] operator[SEP] identifier[getInverseJoinColumnName] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] identifier[insert_Query] operator[=] identifier[StringUtils] operator[SEP] identifier[replace] operator[SEP] identifier[insert_Query] , identifier[CQLTranslator] operator[SEP] identifier[COLUMN_FAMILY] , identifier[translator] operator[SEP] identifier[ensureCase] operator[SEP] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] , identifier[joinTableName] , literal[boolean] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[insert_Query] operator[=] identifier[StringUtils] operator[SEP] identifier[replace] operator[SEP] identifier[insert_Query] , identifier[CQLTranslator] operator[SEP] identifier[COLUMNS] , identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[columnValueBuilder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[statements] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[key] operator[:] identifier[joinTableRecords] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[PropertyAccessor] identifier[accessor] operator[=] identifier[PropertyAccessorFactory] operator[SEP] identifier[getPropertyAccessor] operator[SEP] operator[SEP] identifier[Field] operator[SEP] identifier[entityMetadata] operator[SEP] identifier[getIdAttribute] operator[SEP] operator[SEP] operator[SEP] identifier[getJavaMember] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Object] operator[>] identifier[values] operator[=] identifier[joinTableRecords] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[value] operator[:] identifier[values] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[insertQuery] operator[=] identifier[insert_Query] operator[SEP] identifier[columnValueBuilder] operator[SEP] identifier[append] operator[SEP] identifier[CQLTranslator] operator[SEP] identifier[QUOTE_STR] operator[SEP] operator[SEP] identifier[columnValueBuilder] operator[SEP] identifier[append] operator[SEP] identifier[PropertyAccessorHelper] operator[SEP] identifier[getString] operator[SEP] identifier[key] operator[SEP] operator[+] literal[String] operator[+] identifier[PropertyAccessorHelper] operator[SEP] identifier[getString] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] identifier[columnValueBuilder] operator[SEP] identifier[append] operator[SEP] identifier[CQLTranslator] operator[SEP] identifier[QUOTE_STR] operator[SEP] operator[SEP] identifier[columnValueBuilder] operator[SEP] identifier[append] operator[SEP] identifier[CQLTranslator] operator[SEP] identifier[COMMA_STR] operator[SEP] operator[SEP] identifier[translator] operator[SEP] identifier[appendValue] operator[SEP] identifier[columnValueBuilder] , identifier[key] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , identifier[key] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[columnValueBuilder] operator[SEP] identifier[append] operator[SEP] identifier[CQLTranslator] operator[SEP] identifier[COMMA_STR] operator[SEP] operator[SEP] identifier[translator] operator[SEP] identifier[appendValue] operator[SEP] identifier[columnValueBuilder] , identifier[value] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , identifier[value] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[insertQuery] operator[=] identifier[StringUtils] operator[SEP] identifier[replace] operator[SEP] identifier[insertQuery] , identifier[CQLTranslator] operator[SEP] identifier[COLUMN_VALUES] , identifier[columnValueBuilder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[statements] operator[SEP] identifier[append] operator[SEP] identifier[insertQuery] operator[SEP] operator[SEP] identifier[statements] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] operator[!] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[statements] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[batch_Query] operator[=] identifier[StringUtils] operator[SEP] identifier[replace] operator[SEP] identifier[batch_Query] , identifier[CQLTranslator] operator[SEP] identifier[STATEMENT] , identifier[statements] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[batchBuilder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[batchBuilder] operator[SEP] identifier[append] operator[SEP] identifier[batch_Query] operator[SEP] operator[SEP] identifier[batchBuilder] operator[SEP] identifier[append] operator[SEP] identifier[CQLTranslator] operator[SEP] identifier[APPLY_BATCH] operator[SEP] operator[SEP] identifier[execute] operator[SEP] identifier[batchBuilder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[conn] operator[SEP] operator[SEP] } }
public static Mono<Void> whenDelayError(Publisher<?>... sources) { if (sources.length == 0) { return empty(); } if (sources.length == 1) { return empty(sources[0]); } return onAssembly(new MonoWhen(true, sources)); }
class class_name[name] begin[{] method[whenDelayError, return_type[type[Mono]], modifier[public static], parameter[sources]] begin[{] if[binary_operation[member[sources.length], ==, literal[0]]] begin[{] return[call[.empty, parameter[]]] else begin[{] None end[}] if[binary_operation[member[sources.length], ==, literal[1]]] begin[{] return[call[.empty, parameter[member[.sources]]]] else begin[{] None end[}] return[call[.onAssembly, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), MemberReference(member=sources, 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=MonoWhen, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Mono] operator[<] identifier[Void] operator[>] identifier[whenDelayError] operator[SEP] identifier[Publisher] operator[<] operator[?] operator[>] operator[...] identifier[sources] operator[SEP] { Keyword[if] operator[SEP] identifier[sources] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[empty] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[sources] operator[SEP] identifier[length] operator[==] Other[1] operator[SEP] { Keyword[return] identifier[empty] operator[SEP] identifier[sources] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[onAssembly] operator[SEP] Keyword[new] identifier[MonoWhen] operator[SEP] literal[boolean] , identifier[sources] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("null") protected final @NotNull String getMediaCropProperty(@NotNull MediaRequest mediaRequest, @Nullable MediaHandlerConfig mediaHandlerConfig) { String cropProperty = mediaRequest.getCropProperty(); if (StringUtils.isEmpty(cropProperty)) { if (mediaHandlerConfig != null) { cropProperty = mediaHandlerConfig.getMediaCropProperty(); } else { cropProperty = MediaNameConstants.PN_MEDIA_CROP; } } return cropProperty; }
class class_name[name] begin[{] method[getMediaCropProperty, return_type[type[String]], modifier[final protected], parameter[mediaRequest, mediaHandlerConfig]] begin[{] local_variable[type[String], cropProperty] if[call[StringUtils.isEmpty, parameter[member[.cropProperty]]]] begin[{] if[binary_operation[member[.mediaHandlerConfig], !=, literal[null]]] begin[{] assign[member[.cropProperty], call[mediaHandlerConfig.getMediaCropProperty, parameter[]]] else begin[{] assign[member[.cropProperty], member[MediaNameConstants.PN_MEDIA_CROP]] end[}] else begin[{] None end[}] return[member[.cropProperty]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[final] annotation[@] identifier[NotNull] identifier[String] identifier[getMediaCropProperty] operator[SEP] annotation[@] identifier[NotNull] identifier[MediaRequest] identifier[mediaRequest] , annotation[@] identifier[Nullable] identifier[MediaHandlerConfig] identifier[mediaHandlerConfig] operator[SEP] { identifier[String] identifier[cropProperty] operator[=] identifier[mediaRequest] operator[SEP] identifier[getCropProperty] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[cropProperty] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[mediaHandlerConfig] operator[!=] Other[null] operator[SEP] { identifier[cropProperty] operator[=] identifier[mediaHandlerConfig] operator[SEP] identifier[getMediaCropProperty] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[cropProperty] operator[=] identifier[MediaNameConstants] operator[SEP] identifier[PN_MEDIA_CROP] operator[SEP] } } Keyword[return] identifier[cropProperty] operator[SEP] }
protected <T> Callable<T> wrapTask(Callable<T> task) { // Preserve the MDC context of the caller thread. Map contextMap = MDC.getCopyOfContextMap(); if (contextMap != null) { return new MDCCallableAdapter(task, contextMap); } return task; }
class class_name[name] begin[{] method[wrapTask, return_type[type[Callable]], modifier[protected], parameter[task]] begin[{] local_variable[type[Map], contextMap] if[binary_operation[member[.contextMap], !=, literal[null]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=contextMap, 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=MDCCallableAdapter, sub_type=None))] else begin[{] None end[}] return[member[.task]] end[}] END[}]
Keyword[protected] operator[<] identifier[T] operator[>] identifier[Callable] operator[<] identifier[T] operator[>] identifier[wrapTask] operator[SEP] identifier[Callable] operator[<] identifier[T] operator[>] identifier[task] operator[SEP] { identifier[Map] identifier[contextMap] operator[=] identifier[MDC] operator[SEP] identifier[getCopyOfContextMap] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[contextMap] operator[!=] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[MDCCallableAdapter] operator[SEP] identifier[task] , identifier[contextMap] operator[SEP] operator[SEP] } Keyword[return] identifier[task] operator[SEP] }
private void parseMixed(char[] saved) throws Exception { // Check for PCDATA alone. skipWhitespace(); if (tryRead(')')) { // VC: Proper Group/PE Nesting if (readBuffer != saved) { handler.verror("Illegal Group/PE nesting"); } dataBufferAppend(")*"); tryRead('*'); return; } // Parse mixed content. skipWhitespace(); while (!tryRead(")")) { require('|'); dataBufferAppend('|'); skipWhitespace(); dataBufferAppend(readNmtoken(true)); skipWhitespace(); } // VC: Proper Group/PE Nesting if (readBuffer != saved) { handler.verror("Illegal Group/PE nesting"); } require('*'); dataBufferAppend(")*"); }
class class_name[name] begin[{] method[parseMixed, return_type[void], modifier[private], parameter[saved]] begin[{] call[.skipWhitespace, parameter[]] if[call[.tryRead, parameter[literal[')']]]] begin[{] if[binary_operation[member[.readBuffer], !=, member[.saved]]] begin[{] call[handler.verror, parameter[literal["Illegal Group/PE nesting"]]] else begin[{] None end[}] call[.dataBufferAppend, parameter[literal[")*"]]] call[.tryRead, parameter[literal['*']]] return[None] else begin[{] None end[}] call[.skipWhitespace, parameter[]] while[call[.tryRead, parameter[literal[")"]]]] begin[{] call[.require, parameter[literal['|']]] call[.dataBufferAppend, parameter[literal['|']]] call[.skipWhitespace, parameter[]] call[.dataBufferAppend, parameter[call[.readNmtoken, parameter[literal[true]]]]] call[.skipWhitespace, parameter[]] end[}] if[binary_operation[member[.readBuffer], !=, member[.saved]]] begin[{] call[handler.verror, parameter[literal["Illegal Group/PE nesting"]]] else begin[{] None end[}] call[.require, parameter[literal['*']]] call[.dataBufferAppend, parameter[literal[")*"]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[parseMixed] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[saved] operator[SEP] Keyword[throws] identifier[Exception] { identifier[skipWhitespace] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tryRead] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[readBuffer] operator[!=] identifier[saved] operator[SEP] { identifier[handler] operator[SEP] identifier[verror] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[dataBufferAppend] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[tryRead] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[skipWhitespace] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[tryRead] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[require] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[dataBufferAppend] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[skipWhitespace] operator[SEP] operator[SEP] operator[SEP] identifier[dataBufferAppend] operator[SEP] identifier[readNmtoken] operator[SEP] literal[boolean] operator[SEP] operator[SEP] operator[SEP] identifier[skipWhitespace] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[readBuffer] operator[!=] identifier[saved] operator[SEP] { identifier[handler] operator[SEP] identifier[verror] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[require] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[dataBufferAppend] operator[SEP] literal[String] operator[SEP] operator[SEP] }
void stop() { if (!configuration.customExecutor) { ((ExecutorService) taskExecutor).shutdownNow(); } if (!configuration.customExecutorForCachedImages) { ((ExecutorService) taskExecutorForCachedImages).shutdownNow(); } cacheKeysForImageAwares.clear(); uriLocks.clear(); }
class class_name[name] begin[{] method[stop, return_type[void], modifier[default], parameter[]] begin[{] if[member[configuration.customExecutor]] begin[{] Cast(expression=MemberReference(member=taskExecutor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ExecutorService, sub_type=None)) else begin[{] None end[}] if[member[configuration.customExecutorForCachedImages]] begin[{] Cast(expression=MemberReference(member=taskExecutorForCachedImages, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ExecutorService, sub_type=None)) else begin[{] None end[}] call[cacheKeysForImageAwares.clear, parameter[]] call[uriLocks.clear, parameter[]] end[}] END[}]
Keyword[void] identifier[stop] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[configuration] operator[SEP] identifier[customExecutor] operator[SEP] { operator[SEP] operator[SEP] identifier[ExecutorService] operator[SEP] identifier[taskExecutor] operator[SEP] operator[SEP] identifier[shutdownNow] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[configuration] operator[SEP] identifier[customExecutorForCachedImages] operator[SEP] { operator[SEP] operator[SEP] identifier[ExecutorService] operator[SEP] identifier[taskExecutorForCachedImages] operator[SEP] operator[SEP] identifier[shutdownNow] operator[SEP] operator[SEP] operator[SEP] } identifier[cacheKeysForImageAwares] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[uriLocks] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] }
public ServiceFuture<OperationStatus> deleteHierarchicalEntityAsync(UUID appId, String versionId, UUID hEntityId, final ServiceCallback<OperationStatus> serviceCallback) { return ServiceFuture.fromResponse(deleteHierarchicalEntityWithServiceResponseAsync(appId, versionId, hEntityId), serviceCallback); }
class class_name[name] begin[{] method[deleteHierarchicalEntityAsync, return_type[type[ServiceFuture]], modifier[public], parameter[appId, versionId, hEntityId, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.deleteHierarchicalEntityWithServiceResponseAsync, parameter[member[.appId], member[.versionId], member[.hEntityId]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[OperationStatus] operator[>] identifier[deleteHierarchicalEntityAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[UUID] identifier[hEntityId] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[OperationStatus] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[deleteHierarchicalEntityWithServiceResponseAsync] operator[SEP] identifier[appId] , identifier[versionId] , identifier[hEntityId] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public void setBindsTo(BindingFeature bindsTo) { //Check if we need to update if (this.bindsTo != bindsTo) { //ok go ahead - first get a pointer to the old binds to as we will swap this soon. BindingFeature old = this.bindsTo; //swap it this.bindsTo = bindsTo; //make sure old feature no longer points to this if (old != null && old.getBindsTo() == this) { old.setBindsTo(null); } //make sure new feature points to this if (!(this.bindsTo == null || this.bindsTo.getBindsTo() == this)) { this.bindsTo.setBindsTo(this); } } }
class class_name[name] begin[{] method[setBindsTo, return_type[void], modifier[public], parameter[bindsTo]] begin[{] if[binary_operation[THIS[member[None.bindsTo]], !=, member[.bindsTo]]] begin[{] local_variable[type[BindingFeature], old] assign[THIS[member[None.bindsTo]], member[.bindsTo]] if[binary_operation[binary_operation[member[.old], !=, literal[null]], &&, binary_operation[call[old.getBindsTo, parameter[]], ==, THIS[]]]] begin[{] call[old.setBindsTo, parameter[literal[null]]] else begin[{] None end[}] if[binary_operation[binary_operation[THIS[member[None.bindsTo]], ==, literal[null]], ||, binary_operation[THIS[member[None.bindsTo]call[None.getBindsTo, parameter[]]], ==, THIS[]]]] begin[{] THIS[member[None.bindsTo]call[None.setBindsTo, parameter[THIS[]]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setBindsTo] operator[SEP] identifier[BindingFeature] identifier[bindsTo] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[bindsTo] operator[!=] identifier[bindsTo] operator[SEP] { identifier[BindingFeature] identifier[old] operator[=] Keyword[this] operator[SEP] identifier[bindsTo] operator[SEP] Keyword[this] operator[SEP] identifier[bindsTo] operator[=] identifier[bindsTo] operator[SEP] Keyword[if] operator[SEP] identifier[old] operator[!=] Other[null] operator[&&] identifier[old] operator[SEP] identifier[getBindsTo] operator[SEP] operator[SEP] operator[==] Keyword[this] operator[SEP] { identifier[old] operator[SEP] identifier[setBindsTo] operator[SEP] Other[null] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] operator[SEP] Keyword[this] operator[SEP] identifier[bindsTo] operator[==] Other[null] operator[||] Keyword[this] operator[SEP] identifier[bindsTo] operator[SEP] identifier[getBindsTo] operator[SEP] operator[SEP] operator[==] Keyword[this] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[bindsTo] operator[SEP] identifier[setBindsTo] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } } }
protected Integer attributeAsInt(XMLStreamReader reader, String attributeName, Map<String, String> expressions) throws XMLStreamException { String attributeString = rawAttributeText(reader, attributeName); if (attributeName != null && expressions != null && attributeString != null && attributeString.indexOf("${") != -1) expressions.put(attributeName, attributeString); return attributeString != null ? Integer.valueOf(getSubstitutionValue(attributeString)) : null; }
class class_name[name] begin[{] method[attributeAsInt, return_type[type[Integer]], modifier[protected], parameter[reader, attributeName, expressions]] begin[{] local_variable[type[String], attributeString] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.attributeName], !=, literal[null]], &&, binary_operation[member[.expressions], !=, literal[null]]], &&, binary_operation[member[.attributeString], !=, literal[null]]], &&, binary_operation[call[attributeString.indexOf, parameter[literal["${"]]], !=, literal[1]]]] begin[{] call[expressions.put, parameter[member[.attributeName], member[.attributeString]]] else begin[{] None end[}] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=attributeString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=attributeString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSubstitutionValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[protected] identifier[Integer] identifier[attributeAsInt] operator[SEP] identifier[XMLStreamReader] identifier[reader] , identifier[String] identifier[attributeName] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[expressions] operator[SEP] Keyword[throws] identifier[XMLStreamException] { identifier[String] identifier[attributeString] operator[=] identifier[rawAttributeText] operator[SEP] identifier[reader] , identifier[attributeName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attributeName] operator[!=] Other[null] operator[&&] identifier[expressions] operator[!=] Other[null] operator[&&] identifier[attributeString] operator[!=] Other[null] operator[&&] identifier[attributeString] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] identifier[expressions] operator[SEP] identifier[put] operator[SEP] identifier[attributeName] , identifier[attributeString] operator[SEP] operator[SEP] Keyword[return] identifier[attributeString] operator[!=] Other[null] operator[?] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[getSubstitutionValue] operator[SEP] identifier[attributeString] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] }
public static long generationFromSegmentsFileName(String fileName) { if (fileName.equals(IndexFileNames.SEGMENTS)) { return 0; } else if (fileName.startsWith(IndexFileNames.SEGMENTS)) { return Long.parseLong( fileName.substring(1 + IndexFileNames.SEGMENTS.length()), Character.MAX_RADIX); } else { throw new IllegalArgumentException("fileName \"" + fileName + "\" is not a segments file"); } }
class class_name[name] begin[{] method[generationFromSegmentsFileName, return_type[type[long]], modifier[public static], parameter[fileName]] begin[{] if[call[fileName.equals, parameter[member[IndexFileNames.SEGMENTS]]]] begin[{] return[literal[0]] else begin[{] if[call[fileName.startsWith, parameter[member[IndexFileNames.SEGMENTS]]]] begin[{] return[call[Long.parseLong, parameter[call[fileName.substring, parameter[binary_operation[literal[1], +, call[IndexFileNames.SEGMENTS.length, parameter[]]]]], member[Character.MAX_RADIX]]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="fileName \""), operandr=MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" is not a segments file"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[generationFromSegmentsFileName] operator[SEP] identifier[String] identifier[fileName] operator[SEP] { Keyword[if] operator[SEP] identifier[fileName] operator[SEP] identifier[equals] operator[SEP] identifier[IndexFileNames] operator[SEP] identifier[SEGMENTS] operator[SEP] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fileName] operator[SEP] identifier[startsWith] operator[SEP] identifier[IndexFileNames] operator[SEP] identifier[SEGMENTS] operator[SEP] operator[SEP] { Keyword[return] identifier[Long] operator[SEP] identifier[parseLong] operator[SEP] identifier[fileName] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[+] identifier[IndexFileNames] operator[SEP] identifier[SEGMENTS] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] , identifier[Character] operator[SEP] identifier[MAX_RADIX] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[fileName] operator[+] literal[String] operator[SEP] operator[SEP] } }
@Override protected void prepareInjection(Element element, BeanDefinitionBuilder bean) { addPropertyValueFromElement("pageId", element, bean); addPropertyValueFromElement("applicationName", element, bean); addPropertyValueFromElement("pageName", element, bean); addPropertyValueFromElement("pageClass", element, bean); bean.addPropertyValue("overwrites", InjectionParserUtil.retrieveOverwriteElements(element)); bean.addPropertyValue("injectionSource", PaxWicketBeanInjectionSource.INJECTION_SOURCE_SPRING); }
class class_name[name] begin[{] method[prepareInjection, return_type[void], modifier[protected], parameter[element, bean]] begin[{] call[.addPropertyValueFromElement, parameter[literal["pageId"], member[.element], member[.bean]]] call[.addPropertyValueFromElement, parameter[literal["applicationName"], member[.element], member[.bean]]] call[.addPropertyValueFromElement, parameter[literal["pageName"], member[.element], member[.bean]]] call[.addPropertyValueFromElement, parameter[literal["pageClass"], member[.element], member[.bean]]] call[bean.addPropertyValue, parameter[literal["overwrites"], call[InjectionParserUtil.retrieveOverwriteElements, parameter[member[.element]]]]] call[bean.addPropertyValue, parameter[literal["injectionSource"], member[PaxWicketBeanInjectionSource.INJECTION_SOURCE_SPRING]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[prepareInjection] operator[SEP] identifier[Element] identifier[element] , identifier[BeanDefinitionBuilder] identifier[bean] operator[SEP] { identifier[addPropertyValueFromElement] operator[SEP] literal[String] , identifier[element] , identifier[bean] operator[SEP] operator[SEP] identifier[addPropertyValueFromElement] operator[SEP] literal[String] , identifier[element] , identifier[bean] operator[SEP] operator[SEP] identifier[addPropertyValueFromElement] operator[SEP] literal[String] , identifier[element] , identifier[bean] operator[SEP] operator[SEP] identifier[addPropertyValueFromElement] operator[SEP] literal[String] , identifier[element] , identifier[bean] operator[SEP] operator[SEP] identifier[bean] operator[SEP] identifier[addPropertyValue] operator[SEP] literal[String] , identifier[InjectionParserUtil] operator[SEP] identifier[retrieveOverwriteElements] operator[SEP] identifier[element] operator[SEP] operator[SEP] operator[SEP] identifier[bean] operator[SEP] identifier[addPropertyValue] operator[SEP] literal[String] , identifier[PaxWicketBeanInjectionSource] operator[SEP] identifier[INJECTION_SOURCE_SPRING] operator[SEP] operator[SEP] }
public void setRestartMarker(RestartData restartData) throws IOException, ServerException { Command cmd = new Command("REST", restartData.toFtpCmdArgument()); Reply reply = null; try { reply = controlChannel.exchange(cmd); } catch (FTPReplyParseException e) { throw ServerException.embedFTPReplyParseException(e); } if (!Reply.isPositiveIntermediate(reply)) { throw ServerException.embedUnexpectedReplyCodeException( new UnexpectedReplyCodeException(reply)); } }
class class_name[name] begin[{] method[setRestartMarker, return_type[void], modifier[public], parameter[restartData]] begin[{] local_variable[type[Command], cmd] local_variable[type[Reply], reply] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=reply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=cmd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exchange, postfix_operators=[], prefix_operators=[], qualifier=controlChannel, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=embedFTPReplyParseException, postfix_operators=[], prefix_operators=[], qualifier=ServerException, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['FTPReplyParseException']))], finally_block=None, label=None, resources=None) if[call[Reply.isPositiveIntermediate, parameter[member[.reply]]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=reply, 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=UnexpectedReplyCodeException, sub_type=None))], member=embedUnexpectedReplyCodeException, postfix_operators=[], prefix_operators=[], qualifier=ServerException, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setRestartMarker] operator[SEP] identifier[RestartData] identifier[restartData] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServerException] { identifier[Command] identifier[cmd] operator[=] Keyword[new] identifier[Command] operator[SEP] literal[String] , identifier[restartData] operator[SEP] identifier[toFtpCmdArgument] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Reply] identifier[reply] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[reply] operator[=] identifier[controlChannel] operator[SEP] identifier[exchange] operator[SEP] identifier[cmd] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[FTPReplyParseException] identifier[e] operator[SEP] { Keyword[throw] identifier[ServerException] operator[SEP] identifier[embedFTPReplyParseException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[Reply] operator[SEP] identifier[isPositiveIntermediate] operator[SEP] identifier[reply] operator[SEP] operator[SEP] { Keyword[throw] identifier[ServerException] operator[SEP] identifier[embedUnexpectedReplyCodeException] operator[SEP] Keyword[new] identifier[UnexpectedReplyCodeException] operator[SEP] identifier[reply] operator[SEP] operator[SEP] operator[SEP] } }
private void addValues(final Document doc, final PropertyData prop) throws RepositoryException { int propType = prop.getType(); String fieldName = resolver.createJCRName(prop.getQPath().getName()).getAsString(); if (propType == PropertyType.BINARY) { InternalQName propName = prop.getQPath().getName(); List<ValueData> data = null; if (node.getQPath().getName().equals(Constants.JCR_CONTENT) && isIndexed(propName)) { // seems nt:file found, try for nt:resource props PropertyData pmime = node.getProperty(Constants.JCR_MIMETYPE.getAsString()); if (pmime == null && !node.containAllProperties()) { pmime = (PropertyData)stateProvider.getItemData(node, new QPathEntry(Constants.JCR_MIMETYPE, 0), ItemType.PROPERTY); } if (pmime != null && pmime.getValues() != null && !pmime.getValues().isEmpty()) { // ok, have a reader // if the prop obtainer from cache it will contains a values, // otherwise read prop with values from DM PropertyData propData = prop.getValues() != null && !prop.getValues().isEmpty() ? prop : ((PropertyData)stateProvider .getItemData(node, new QPathEntry(Constants.JCR_DATA, 0), ItemType.PROPERTY)); // index if have jcr:mimeType sibling for this binary property only try { if (propData == null || (data = propData.getValues()) == null || data.isEmpty()) { if (LOG.isDebugEnabled()) { LOG.debug("No value found for the property located at " + prop.getQPath().getAsString()); } return; } DocumentReader dreader = extractor.getDocumentReader(ValueDataUtil.getString(pmime.getValues().get(0))); // check the jcr:encoding property PropertyData encProp = node.getProperty(Constants.JCR_ENCODING.getAsString()); if (encProp == null && !node.containAllProperties()) { encProp = (PropertyData)stateProvider.getItemData(node, new QPathEntry(Constants.JCR_ENCODING, 0), ItemType.PROPERTY); } String encoding = null; if (encProp != null && encProp.getValues() != null && !encProp.getValues().isEmpty()) { // encoding parameter used encoding = ValueDataUtil.getString(encProp.getValues().get(0)); } else { if (LOG.isDebugEnabled()) { LOG.debug("No encoding found for the node located at " + node.getQPath().getAsString()); } } if (dreader instanceof AdvancedDocumentReader) { // its a tika document reader that supports getContentAsReader for (ValueData pvd : data) { // tikaDocumentReader will close inputStream, so no need to close it at finally // statement InputStream is = null; is = pvd.getAsStream(); Reader reader; if (encoding != null) { reader = ((AdvancedDocumentReader)dreader).getContentAsReader(is, encoding); } else { reader = ((AdvancedDocumentReader)dreader).getContentAsReader(is); } doc.add(createFulltextField(reader)); } } else { // old-style document reader for (ValueData pvd : data) { InputStream is = null; try { is = pvd.getAsStream(); Reader reader; if (encoding != null) { reader = new StringReader(dreader.getContentAsText(is, encoding)); } else { reader = new StringReader(dreader.getContentAsText(is)); } doc.add(createFulltextField(reader)); } finally { try { is.close(); } catch (Throwable e) //NOSONAR { if (LOG.isTraceEnabled()) { LOG.trace("An exception occurred: " + e.getMessage()); } } } } } if (data.size() > 1) { // real multi-valued addMVPName(doc, prop.getQPath().getName()); } } catch (DocumentReadException e) { if (LOG.isDebugEnabled()) { LOG.debug("Cannot extract the full text content of the property " + propData.getQPath().getAsString() + ", propery id '" + propData.getIdentifier() + "' : " + e, e); } else { LOG.warn("Cannot extract the full text content of the property " + propData.getQPath().getAsString() + ", propery id '" + propData.getIdentifier()); } } catch (HandlerNotFoundException e) { // no handler - no index if (LOG.isDebugEnabled()) { LOG.debug("Can not indexing the document by path " + propData.getQPath().getAsString() + ", propery id '" + propData.getIdentifier() + "' : " + e, e); } } catch (IOException e) { // no data - no index if (LOG.isDebugEnabled()) { LOG.debug("An IO exception occurred while trying to extract the full text content of the property " + propData.getQPath().getAsString() + ", propery id '" + propData.getIdentifier() + "' : " + e, e); } else { LOG.warn("An IO exception occurred while trying to extract the full text content of the property " + propData.getQPath().getAsString() + ", propery id '" + propData.getIdentifier()); } } catch (Exception e) { if (LOG.isDebugEnabled()) { LOG.debug("An exception occurred while trying to extract the full text content of the property " + propData.getQPath().getAsString() + ", propery id '" + propData.getIdentifier() + "' : " + e, e); } else { LOG.warn("An exception occurred while trying to extract the full text content of the property " + propData.getQPath().getAsString() + ", propery id '" + propData.getIdentifier()); } } } else { if (LOG.isDebugEnabled()) { LOG.debug("no mime type found for the node located at " + node.getQPath().getAsString()); } } } } else { try { // if the prop obtainer from cache it will contains a values, otherwise // read prop with values from DM // We access to the Item by path to avoid having to rebuild the path if needed in case // the indexingLoadBatchingThreshold is enabled only otherwise we get it from the id like // before PropertyData propData = prop.getValues() != null && !prop.getValues().isEmpty() ? prop : (PropertyData)(loadPropertyByName ? stateProvider.getItemData(node, new QPathEntry(prop.getQPath().getName(), 0), ItemType.PROPERTY) : stateProvider.getItemData(prop.getIdentifier())); List<ValueData> data; if (propData == null || (data = propData.getValues()) == null || data.isEmpty()) { if (LOG.isDebugEnabled()) { LOG.warn("null value found at property " + prop.getQPath().getAsString()); } return; } InternalQName name = prop.getQPath().getName(); for (ValueData value : data) { switch (propType) { case PropertyType.BOOLEAN : if (isIndexed(name)) { addBooleanValue(doc, fieldName, ValueDataUtil.getBoolean(value)); } break; case PropertyType.DATE : if (isIndexed(name)) { addCalendarValue(doc, fieldName, ValueDataUtil.getDate(value)); } break; case PropertyType.DOUBLE : if (isIndexed(name)) { addDoubleValue(doc, fieldName, ValueDataUtil.getDouble(value)); } break; case PropertyType.LONG : if (isIndexed(name)) { addLongValue(doc, fieldName, ValueDataUtil.getLong(value)); } break; case PropertyType.REFERENCE : if (isIndexed(name)) { addReferenceValue(doc, fieldName, ValueDataUtil.getString(value)); } break; case PropertyType.PATH : if (isIndexed(name)) { addPathValue(doc, fieldName, resolver.createJCRPath(ValueDataUtil.getPath(value)).getAsString(false)); } break; case PropertyType.STRING : if (isIndexed(name)) { // never fulltext index jcr:uuid String if (name.equals(Constants.JCR_UUID)) { addStringValue(doc, fieldName, ValueDataUtil.getString(value), false, false, DEFAULT_BOOST, true); } else { addStringValue(doc, fieldName, ValueDataUtil.getString(value), true, isIncludedInNodeIndex(name), getPropertyBoost(name), useInExcerpt(name)); } } break; case PropertyType.NAME : // jcr:primaryType and jcr:mixinTypes are required for correct // node type resolution in queries if (isIndexed(name) || name.equals(Constants.JCR_PRIMARYTYPE) || name.equals(Constants.JCR_MIXINTYPES)) { addNameValue(doc, fieldName, resolver.createJCRName(ValueDataUtil.getName(value)).getAsString()); } break; case ExtendedPropertyType.PERMISSION : break; default : throw new IllegalArgumentException("illegal internal value type " + propType); } // add length // add not planed if (indexFormatVersion.getVersion() >= IndexFormatVersion.V3.getVersion()) { addLength(doc, fieldName, value, propType); } } if (data.size() > 1) { // real multi-valued addMVPName(doc, prop.getQPath().getName()); } } catch (RepositoryException e) { LOG.error("Index of property value error. " + prop.getQPath().getAsString() + ".", e); throw new RepositoryException("Index of property value error. " + prop.getQPath().getAsString() + ". " + e, e); } } }
class class_name[name] begin[{] method[addValues, return_type[void], modifier[private], parameter[doc, prop]] begin[{] local_variable[type[int], propType] local_variable[type[String], fieldName] if[binary_operation[member[.propType], ==, member[PropertyType.BINARY]]] begin[{] local_variable[type[InternalQName], propName] local_variable[type[List], data] if[binary_operation[call[node.getQPath, parameter[]], &&, call[.isIndexed, parameter[member[.propName]]]]] begin[{] local_variable[type[PropertyData], pmime] if[binary_operation[binary_operation[member[.pmime], ==, literal[null]], &&, call[node.containAllProperties, parameter[]]]] begin[{] assign[member[.pmime], Cast(expression=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=JCR_MIMETYPE, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QPathEntry, sub_type=None)), MemberReference(member=PROPERTY, postfix_operators=[], prefix_operators=[], qualifier=ItemType, selectors=[])], member=getItemData, postfix_operators=[], prefix_operators=[], qualifier=stateProvider, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=PropertyData, sub_type=None))] else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[member[.pmime], !=, literal[null]], &&, binary_operation[call[pmime.getValues, parameter[]], !=, literal[null]]], &&, call[pmime.getValues, parameter[]]]] begin[{] local_variable[type[PropertyData], propData] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=propData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getValues, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operator=||), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), operator=||), else_statement=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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No value found for the property located at "), operandr=MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=prop, selectors=[MethodInvocation(arguments=[], member=getAsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValues, postfix_operators=[], prefix_operators=[], qualifier=pmime, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=getString, postfix_operators=[], prefix_operators=[], qualifier=ValueDataUtil, selectors=[], type_arguments=None)], member=getDocumentReader, postfix_operators=[], prefix_operators=[], qualifier=extractor, selectors=[], type_arguments=None), name=dreader)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DocumentReader, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAsString, postfix_operators=[], prefix_operators=[], qualifier=Constants.JCR_ENCODING, selectors=[], type_arguments=None)], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), name=encProp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PropertyData, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=encProp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=containAllProperties, postfix_operators=[], prefix_operators=['!'], qualifier=node, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=encProp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=JCR_ENCODING, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QPathEntry, sub_type=None)), MemberReference(member=PROPERTY, postfix_operators=[], prefix_operators=[], qualifier=ItemType, selectors=[])], member=getItemData, postfix_operators=[], prefix_operators=[], qualifier=stateProvider, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=PropertyData, sub_type=None))), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=encoding)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=encProp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getValues, postfix_operators=[], prefix_operators=[], qualifier=encProp, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), operandr=MethodInvocation(arguments=[], member=getValues, postfix_operators=[], prefix_operators=['!'], qualifier=encProp, selectors=[MethodInvocation(arguments=[], member=isEmpty, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), 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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No encoding found for the node located at "), operandr=MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[MethodInvocation(arguments=[], member=getAsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=encoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValues, postfix_operators=[], prefix_operators=[], qualifier=encProp, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=getString, postfix_operators=[], prefix_operators=[], qualifier=ValueDataUtil, selectors=[], type_arguments=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=dreader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=AdvancedDocumentReader, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=is)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getAsStream, postfix_operators=[], prefix_operators=[], qualifier=pvd, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=reader)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Reader, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=encoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getContentAsText, postfix_operators=[], prefix_operators=[], qualifier=dreader, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringReader, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=encoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getContentAsText, postfix_operators=[], prefix_operators=[], qualifier=dreader, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringReader, sub_type=None))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createFulltextField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=doc, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=is, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="An exception occurred: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+)], member=trace, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None)], label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pvd)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ValueData, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=is)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getAsStream, postfix_operators=[], prefix_operators=[], qualifier=pvd, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=reader)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Reader, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=encoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=dreader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AdvancedDocumentReader, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=dreader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AdvancedDocumentReader, sub_type=None))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createFulltextField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=doc, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pvd)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ValueData, sub_type=None))), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=prop, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=addMVPName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot extract the full text content of the property "), operandr=MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[MethodInvocation(arguments=[], member=getAsString, 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=", propery id '"), operator=+), operandr=MethodInvocation(arguments=[], member=getIdentifier, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[], type_arguments=None), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot extract the full text content of the property "), operandr=MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[MethodInvocation(arguments=[], member=getAsString, 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=", propery id '"), operator=+), operandr=MethodInvocation(arguments=[], member=getIdentifier, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' : "), operator=+), operandr=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['DocumentReadException'])), CatchClause(block=[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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can not indexing the document by path "), operandr=MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[MethodInvocation(arguments=[], member=getAsString, 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=", propery id '"), operator=+), operandr=MethodInvocation(arguments=[], member=getIdentifier, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' : "), operator=+), operandr=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['HandlerNotFoundException'])), CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="An IO exception occurred while trying to extract the full text content of the property "), operandr=MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[MethodInvocation(arguments=[], member=getAsString, 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=", propery id '"), operator=+), operandr=MethodInvocation(arguments=[], member=getIdentifier, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[], type_arguments=None), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="An IO exception occurred while trying to extract the full text content of the property "), operandr=MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[MethodInvocation(arguments=[], member=getAsString, 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=", propery id '"), operator=+), operandr=MethodInvocation(arguments=[], member=getIdentifier, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' : "), operator=+), operandr=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException'])), CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="An exception occurred while trying to extract the full text content of the property "), operandr=MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[MethodInvocation(arguments=[], member=getAsString, 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=", propery id '"), operator=+), operandr=MethodInvocation(arguments=[], member=getIdentifier, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[], type_arguments=None), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="An exception occurred while trying to extract the full text content of the property "), operandr=MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[MethodInvocation(arguments=[], member=getAsString, 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=", propery id '"), operator=+), operandr=MethodInvocation(arguments=[], member=getIdentifier, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' : "), operator=+), operandr=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[binary_operation[literal["no mime type found for the node located at "], +, call[node.getQPath, parameter[]]]]] else begin[{] None end[}] end[}] else begin[{] None end[}] else begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getValues, postfix_operators=[], prefix_operators=[], qualifier=prop, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=getValues, postfix_operators=[], prefix_operators=['!'], qualifier=prop, selectors=[MethodInvocation(arguments=[], member=isEmpty, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), if_false=Cast(expression=TernaryExpression(condition=MemberReference(member=loadPropertyByName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getIdentifier, postfix_operators=[], prefix_operators=[], qualifier=prop, selectors=[], type_arguments=None)], member=getItemData, postfix_operators=[], prefix_operators=[], qualifier=stateProvider, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=prop, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QPathEntry, sub_type=None)), MemberReference(member=PROPERTY, postfix_operators=[], prefix_operators=[], qualifier=ItemType, selectors=[])], member=getItemData, postfix_operators=[], prefix_operators=[], qualifier=stateProvider, selectors=[], type_arguments=None)), type=ReferenceType(arguments=None, dimensions=[], name=PropertyData, sub_type=None)), if_true=MemberReference(member=prop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), name=propData)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PropertyData, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=data)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ValueData, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=propData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getValues, postfix_operators=[], prefix_operators=[], qualifier=propData, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operator=||), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), operator=||), else_statement=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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="null value found at property "), operandr=MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=prop, selectors=[MethodInvocation(arguments=[], member=getAsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=prop, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InternalQName, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=BOOLEAN, postfix_operators=[], prefix_operators=[], qualifier=PropertyType, selectors=[])], statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isIndexed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBoolean, postfix_operators=[], prefix_operators=[], qualifier=ValueDataUtil, selectors=[], type_arguments=None)], member=addBooleanValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=DATE, postfix_operators=[], prefix_operators=[], qualifier=PropertyType, selectors=[])], statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isIndexed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDate, postfix_operators=[], prefix_operators=[], qualifier=ValueDataUtil, selectors=[], type_arguments=None)], member=addCalendarValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=DOUBLE, postfix_operators=[], prefix_operators=[], qualifier=PropertyType, selectors=[])], statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isIndexed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDouble, postfix_operators=[], prefix_operators=[], qualifier=ValueDataUtil, selectors=[], type_arguments=None)], member=addDoubleValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=LONG, postfix_operators=[], prefix_operators=[], qualifier=PropertyType, selectors=[])], statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isIndexed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getLong, postfix_operators=[], prefix_operators=[], qualifier=ValueDataUtil, selectors=[], type_arguments=None)], member=addLongValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=REFERENCE, postfix_operators=[], prefix_operators=[], qualifier=PropertyType, selectors=[])], statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isIndexed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=ValueDataUtil, selectors=[], type_arguments=None)], member=addReferenceValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=PATH, postfix_operators=[], prefix_operators=[], qualifier=PropertyType, selectors=[])], statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isIndexed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=ValueDataUtil, selectors=[], type_arguments=None)], member=createJCRPath, postfix_operators=[], prefix_operators=[], qualifier=resolver, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=getAsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=addPathValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=STRING, postfix_operators=[], prefix_operators=[], qualifier=PropertyType, selectors=[])], statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isIndexed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=JCR_UUID, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=ValueDataUtil, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isIncludedInNodeIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPropertyBoost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=useInExcerpt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addStringValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=ValueDataUtil, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=DEFAULT_BOOST, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=addStringValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=NAME, postfix_operators=[], prefix_operators=[], qualifier=PropertyType, selectors=[])], statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isIndexed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=JCR_PRIMARYTYPE, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[MemberReference(member=JCR_MIXINTYPES, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getName, postfix_operators=[], prefix_operators=[], qualifier=ValueDataUtil, selectors=[], type_arguments=None)], member=createJCRName, postfix_operators=[], prefix_operators=[], qualifier=resolver, selectors=[MethodInvocation(arguments=[], member=getAsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=addNameValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=PERMISSION, postfix_operators=[], prefix_operators=[], qualifier=ExtendedPropertyType, selectors=[])], statements=[BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="illegal internal value type "), operandr=MemberReference(member=propType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)])], expression=MemberReference(member=propType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getVersion, postfix_operators=[], prefix_operators=[], qualifier=indexFormatVersion, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getVersion, postfix_operators=[], prefix_operators=[], qualifier=IndexFormatVersion.V3, selectors=[], type_arguments=None), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=propType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=data, 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=ValueData, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=prop, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=addMVPName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Index of property value error. "), operandr=MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=prop, selectors=[MethodInvocation(arguments=[], member=getAsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Index of property value error. "), operandr=MethodInvocation(arguments=[], member=getQPath, postfix_operators=[], prefix_operators=[], qualifier=prop, selectors=[MethodInvocation(arguments=[], member=getAsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=". "), operator=+), operandr=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=RepositoryException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RepositoryException']))], finally_block=None, label=None, resources=None) end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[addValues] operator[SEP] Keyword[final] identifier[Document] identifier[doc] , Keyword[final] identifier[PropertyData] identifier[prop] operator[SEP] Keyword[throws] identifier[RepositoryException] { Keyword[int] identifier[propType] operator[=] identifier[prop] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[fieldName] operator[=] identifier[resolver] operator[SEP] identifier[createJCRName] operator[SEP] identifier[prop] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[propType] operator[==] identifier[PropertyType] operator[SEP] identifier[BINARY] operator[SEP] { identifier[InternalQName] identifier[propName] operator[=] identifier[prop] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[ValueData] operator[>] identifier[data] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[node] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Constants] operator[SEP] identifier[JCR_CONTENT] operator[SEP] operator[&&] identifier[isIndexed] operator[SEP] identifier[propName] operator[SEP] operator[SEP] { identifier[PropertyData] identifier[pmime] operator[=] identifier[node] operator[SEP] identifier[getProperty] operator[SEP] identifier[Constants] operator[SEP] identifier[JCR_MIMETYPE] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pmime] operator[==] Other[null] operator[&&] operator[!] identifier[node] operator[SEP] identifier[containAllProperties] operator[SEP] operator[SEP] operator[SEP] { identifier[pmime] operator[=] operator[SEP] identifier[PropertyData] operator[SEP] identifier[stateProvider] operator[SEP] identifier[getItemData] operator[SEP] identifier[node] , Keyword[new] identifier[QPathEntry] operator[SEP] identifier[Constants] operator[SEP] identifier[JCR_MIMETYPE] , Other[0] operator[SEP] , identifier[ItemType] operator[SEP] identifier[PROPERTY] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[pmime] operator[!=] Other[null] operator[&&] identifier[pmime] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[pmime] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[PropertyData] identifier[propData] operator[=] identifier[prop] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[prop] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] identifier[prop] operator[:] operator[SEP] operator[SEP] identifier[PropertyData] operator[SEP] identifier[stateProvider] operator[SEP] identifier[getItemData] operator[SEP] identifier[node] , Keyword[new] identifier[QPathEntry] operator[SEP] identifier[Constants] operator[SEP] identifier[JCR_DATA] , Other[0] operator[SEP] , identifier[ItemType] operator[SEP] identifier[PROPERTY] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[propData] operator[==] Other[null] operator[||] operator[SEP] identifier[data] operator[=] identifier[propData] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] identifier[data] operator[SEP] identifier[isEmpty] operator[SEP] 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] literal[String] operator[+] identifier[prop] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] } identifier[DocumentReader] identifier[dreader] operator[=] identifier[extractor] operator[SEP] identifier[getDocumentReader] operator[SEP] identifier[ValueDataUtil] operator[SEP] identifier[getString] operator[SEP] identifier[pmime] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[PropertyData] identifier[encProp] operator[=] identifier[node] operator[SEP] identifier[getProperty] operator[SEP] identifier[Constants] operator[SEP] identifier[JCR_ENCODING] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[encProp] operator[==] Other[null] operator[&&] operator[!] identifier[node] operator[SEP] identifier[containAllProperties] operator[SEP] operator[SEP] operator[SEP] { identifier[encProp] operator[=] operator[SEP] identifier[PropertyData] operator[SEP] identifier[stateProvider] operator[SEP] identifier[getItemData] operator[SEP] identifier[node] , Keyword[new] identifier[QPathEntry] operator[SEP] identifier[Constants] operator[SEP] identifier[JCR_ENCODING] , Other[0] operator[SEP] , identifier[ItemType] operator[SEP] identifier[PROPERTY] operator[SEP] operator[SEP] } identifier[String] identifier[encoding] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[encProp] operator[!=] Other[null] operator[&&] identifier[encProp] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[encProp] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[encoding] operator[=] identifier[ValueDataUtil] operator[SEP] identifier[getString] operator[SEP] identifier[encProp] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] 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[node] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[dreader] Keyword[instanceof] identifier[AdvancedDocumentReader] operator[SEP] { Keyword[for] operator[SEP] identifier[ValueData] identifier[pvd] operator[:] identifier[data] operator[SEP] { identifier[InputStream] identifier[is] operator[=] Other[null] operator[SEP] identifier[is] operator[=] identifier[pvd] operator[SEP] identifier[getAsStream] operator[SEP] operator[SEP] operator[SEP] identifier[Reader] identifier[reader] operator[SEP] Keyword[if] operator[SEP] identifier[encoding] operator[!=] Other[null] operator[SEP] { identifier[reader] operator[=] operator[SEP] operator[SEP] identifier[AdvancedDocumentReader] operator[SEP] identifier[dreader] operator[SEP] operator[SEP] identifier[getContentAsReader] operator[SEP] identifier[is] , identifier[encoding] operator[SEP] operator[SEP] } Keyword[else] { identifier[reader] operator[=] operator[SEP] operator[SEP] identifier[AdvancedDocumentReader] operator[SEP] identifier[dreader] operator[SEP] operator[SEP] identifier[getContentAsReader] operator[SEP] identifier[is] operator[SEP] operator[SEP] } identifier[doc] operator[SEP] identifier[add] operator[SEP] identifier[createFulltextField] operator[SEP] identifier[reader] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[for] operator[SEP] identifier[ValueData] identifier[pvd] operator[:] identifier[data] operator[SEP] { identifier[InputStream] identifier[is] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[is] operator[=] identifier[pvd] operator[SEP] identifier[getAsStream] operator[SEP] operator[SEP] operator[SEP] identifier[Reader] identifier[reader] operator[SEP] Keyword[if] operator[SEP] identifier[encoding] operator[!=] Other[null] operator[SEP] { identifier[reader] operator[=] Keyword[new] identifier[StringReader] operator[SEP] identifier[dreader] operator[SEP] identifier[getContentAsText] operator[SEP] identifier[is] , identifier[encoding] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[reader] operator[=] Keyword[new] identifier[StringReader] operator[SEP] identifier[dreader] operator[SEP] identifier[getContentAsText] operator[SEP] identifier[is] operator[SEP] operator[SEP] operator[SEP] } identifier[doc] operator[SEP] identifier[add] operator[SEP] identifier[createFulltextField] operator[SEP] identifier[reader] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[try] { identifier[is] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] 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[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } } } Keyword[if] operator[SEP] identifier[data] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[addMVPName] operator[SEP] identifier[doc] , identifier[prop] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[DocumentReadException] identifier[e] 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[propData] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[propData] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[e] , identifier[e] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[propData] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[propData] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[HandlerNotFoundException] identifier[e] 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[propData] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[propData] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[e] , identifier[e] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] 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[propData] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[propData] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[e] , identifier[e] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[propData] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[propData] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] 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[propData] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[propData] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[e] , identifier[e] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[propData] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[propData] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] 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[node] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[else] { Keyword[try] { identifier[PropertyData] identifier[propData] operator[=] identifier[prop] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[prop] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] identifier[prop] operator[:] operator[SEP] identifier[PropertyData] operator[SEP] operator[SEP] identifier[loadPropertyByName] operator[?] identifier[stateProvider] operator[SEP] identifier[getItemData] operator[SEP] identifier[node] , Keyword[new] identifier[QPathEntry] operator[SEP] identifier[prop] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , Other[0] operator[SEP] , identifier[ItemType] operator[SEP] identifier[PROPERTY] operator[SEP] operator[:] identifier[stateProvider] operator[SEP] identifier[getItemData] operator[SEP] identifier[prop] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[ValueData] operator[>] identifier[data] operator[SEP] Keyword[if] operator[SEP] identifier[propData] operator[==] Other[null] operator[||] operator[SEP] identifier[data] operator[=] identifier[propData] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] identifier[data] operator[SEP] identifier[isEmpty] operator[SEP] 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[warn] operator[SEP] literal[String] operator[+] identifier[prop] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] } identifier[InternalQName] identifier[name] operator[=] identifier[prop] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ValueData] identifier[value] operator[:] identifier[data] operator[SEP] { Keyword[switch] operator[SEP] identifier[propType] operator[SEP] { Keyword[case] identifier[PropertyType] operator[SEP] identifier[BOOLEAN] operator[:] Keyword[if] operator[SEP] identifier[isIndexed] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[addBooleanValue] operator[SEP] identifier[doc] , identifier[fieldName] , identifier[ValueDataUtil] operator[SEP] identifier[getBoolean] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[PropertyType] operator[SEP] identifier[DATE] operator[:] Keyword[if] operator[SEP] identifier[isIndexed] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[addCalendarValue] operator[SEP] identifier[doc] , identifier[fieldName] , identifier[ValueDataUtil] operator[SEP] identifier[getDate] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[PropertyType] operator[SEP] identifier[DOUBLE] operator[:] Keyword[if] operator[SEP] identifier[isIndexed] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[addDoubleValue] operator[SEP] identifier[doc] , identifier[fieldName] , identifier[ValueDataUtil] operator[SEP] identifier[getDouble] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[PropertyType] operator[SEP] identifier[LONG] operator[:] Keyword[if] operator[SEP] identifier[isIndexed] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[addLongValue] operator[SEP] identifier[doc] , identifier[fieldName] , identifier[ValueDataUtil] operator[SEP] identifier[getLong] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[PropertyType] operator[SEP] identifier[REFERENCE] operator[:] Keyword[if] operator[SEP] identifier[isIndexed] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[addReferenceValue] operator[SEP] identifier[doc] , identifier[fieldName] , identifier[ValueDataUtil] operator[SEP] identifier[getString] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[PropertyType] operator[SEP] identifier[PATH] operator[:] Keyword[if] operator[SEP] identifier[isIndexed] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[addPathValue] operator[SEP] identifier[doc] , identifier[fieldName] , identifier[resolver] operator[SEP] identifier[createJCRPath] operator[SEP] identifier[ValueDataUtil] operator[SEP] identifier[getPath] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] literal[boolean] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[PropertyType] operator[SEP] identifier[STRING] operator[:] Keyword[if] operator[SEP] identifier[isIndexed] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[equals] operator[SEP] identifier[Constants] operator[SEP] identifier[JCR_UUID] operator[SEP] operator[SEP] { identifier[addStringValue] operator[SEP] identifier[doc] , identifier[fieldName] , identifier[ValueDataUtil] operator[SEP] identifier[getString] operator[SEP] identifier[value] operator[SEP] , literal[boolean] , literal[boolean] , identifier[DEFAULT_BOOST] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { identifier[addStringValue] operator[SEP] identifier[doc] , identifier[fieldName] , identifier[ValueDataUtil] operator[SEP] identifier[getString] operator[SEP] identifier[value] operator[SEP] , literal[boolean] , identifier[isIncludedInNodeIndex] operator[SEP] identifier[name] operator[SEP] , identifier[getPropertyBoost] operator[SEP] identifier[name] operator[SEP] , identifier[useInExcerpt] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] identifier[PropertyType] operator[SEP] identifier[NAME] operator[:] Keyword[if] operator[SEP] identifier[isIndexed] operator[SEP] identifier[name] operator[SEP] operator[||] identifier[name] operator[SEP] identifier[equals] operator[SEP] identifier[Constants] operator[SEP] identifier[JCR_PRIMARYTYPE] operator[SEP] operator[||] identifier[name] operator[SEP] identifier[equals] operator[SEP] identifier[Constants] operator[SEP] identifier[JCR_MIXINTYPES] operator[SEP] operator[SEP] { identifier[addNameValue] operator[SEP] identifier[doc] , identifier[fieldName] , identifier[resolver] operator[SEP] identifier[createJCRName] operator[SEP] identifier[ValueDataUtil] operator[SEP] identifier[getName] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[ExtendedPropertyType] operator[SEP] identifier[PERMISSION] operator[:] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[propType] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[indexFormatVersion] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[>=] identifier[IndexFormatVersion] operator[SEP] identifier[V3] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[SEP] { identifier[addLength] operator[SEP] identifier[doc] , identifier[fieldName] , identifier[value] , identifier[propType] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[data] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[addMVPName] operator[SEP] identifier[doc] , identifier[prop] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RepositoryException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[prop] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[RepositoryException] operator[SEP] literal[String] operator[+] identifier[prop] operator[SEP] identifier[getQPath] operator[SEP] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[e] , identifier[e] operator[SEP] operator[SEP] } } }