code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static DateTime parseTimeToday(String timeString) { timeString = StrUtil.format("{} {}", today(), timeString); return parse(timeString, DatePattern.NORM_DATETIME_FORMAT); }
class class_name[name] begin[{] method[parseTimeToday, return_type[type[DateTime]], modifier[public static], parameter[timeString]] begin[{] assign[member[.timeString], call[StrUtil.format, parameter[literal["{} {}"], call[.today, parameter[]], member[.timeString]]]] return[call[.parse, parameter[member[.timeString], member[DatePattern.NORM_DATETIME_FORMAT]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[DateTime] identifier[parseTimeToday] operator[SEP] identifier[String] identifier[timeString] operator[SEP] { identifier[timeString] operator[=] identifier[StrUtil] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[today] operator[SEP] operator[SEP] , identifier[timeString] operator[SEP] operator[SEP] Keyword[return] identifier[parse] operator[SEP] identifier[timeString] , identifier[DatePattern] operator[SEP] identifier[NORM_DATETIME_FORMAT] operator[SEP] operator[SEP] }
BlockId append(String fileName, IoBuffer buffer) { try { IoChannel fileChannel = getFileChannel(fileName); // Rewind the buffer for writing buffer.rewind(); // Append the block to the file long newSize = fileChannel.append(buffer); // Return the new block id return new BlockId(fileName, newSize / BLOCK_SIZE - 1); } catch (IOException e) { e.printStackTrace(); return null; } }
class class_name[name] begin[{] method[append, return_type[type[BlockId]], modifier[default], parameter[fileName, buffer]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFileChannel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=fileChannel)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IoChannel, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=rewind, postfix_operators=[], prefix_operators=[], qualifier=buffer, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=fileChannel, selectors=[], type_arguments=None), name=newSize)], modifiers=set(), type=BasicType(dimensions=[], name=long)), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=newSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BLOCK_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BlockId, sub_type=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
identifier[BlockId] identifier[append] operator[SEP] identifier[String] identifier[fileName] , identifier[IoBuffer] identifier[buffer] operator[SEP] { Keyword[try] { identifier[IoChannel] identifier[fileChannel] operator[=] identifier[getFileChannel] operator[SEP] identifier[fileName] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[rewind] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[newSize] operator[=] identifier[fileChannel] operator[SEP] identifier[append] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[BlockId] operator[SEP] identifier[fileName] , identifier[newSize] operator[/] identifier[BLOCK_SIZE] operator[-] Other[1] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
public void read_attribute_asynch(String[] attnames, CallBack cb) throws DevFailed { deviceProxyDAO.read_attribute_asynch(this, attnames, cb); }
class class_name[name] begin[{] method[read_attribute_asynch, return_type[void], modifier[public], parameter[attnames, cb]] begin[{] call[deviceProxyDAO.read_attribute_asynch, parameter[THIS[], member[.attnames], member[.cb]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[read_attribute_asynch] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[attnames] , identifier[CallBack] identifier[cb] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[deviceProxyDAO] operator[SEP] identifier[read_attribute_asynch] operator[SEP] Keyword[this] , identifier[attnames] , identifier[cb] operator[SEP] operator[SEP] }
@Nullable static String getString( @NonNull JSONObject jsonObject, @NonNull @Size(min = 1) String fieldName) throws JSONException { return nullIfNullOrEmpty(jsonObject.getString(fieldName)); }
class class_name[name] begin[{] method[getString, return_type[type[String]], modifier[static], parameter[jsonObject, fieldName]] begin[{] return[call[.nullIfNullOrEmpty, parameter[call[jsonObject.getString, parameter[member[.fieldName]]]]]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[static] identifier[String] identifier[getString] operator[SEP] annotation[@] identifier[NonNull] identifier[JSONObject] identifier[jsonObject] , annotation[@] identifier[NonNull] annotation[@] identifier[Size] operator[SEP] identifier[min] operator[=] Other[1] operator[SEP] identifier[String] identifier[fieldName] operator[SEP] Keyword[throws] identifier[JSONException] { Keyword[return] identifier[nullIfNullOrEmpty] operator[SEP] identifier[jsonObject] operator[SEP] identifier[getString] operator[SEP] identifier[fieldName] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") private void initSession(SMTPClientSession session) { Iterator<SMTPDeliveryEnvelope> transactionList = ((Iterator<SMTPDeliveryEnvelope>) session.getAttribute(SMTP_TRANSACTIONS_KEY)); SMTPDeliveryEnvelope transaction = transactionList.next(); session.setAttribute(CURRENT_SMTP_TRANSACTION_KEY,transaction); session.setAttribute(RECIPIENTS_KEY, transaction.getRecipients().iterator()); session.setAttribute(DELIVERY_STATUS_KEY, new ArrayList<DeliveryRecipientStatus>()); // cleanup old attribute session.setAttribute(CURRENT_RCPT_KEY, null); }
class class_name[name] begin[{] method[initSession, return_type[void], modifier[private], parameter[session]] begin[{] local_variable[type[Iterator], transactionList] local_variable[type[SMTPDeliveryEnvelope], transaction] call[session.setAttribute, parameter[member[.CURRENT_SMTP_TRANSACTION_KEY], member[.transaction]]] call[session.setAttribute, parameter[member[.RECIPIENTS_KEY], call[transaction.getRecipients, parameter[]]]] call[session.setAttribute, parameter[member[.DELIVERY_STATUS_KEY], 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=DeliveryRecipientStatus, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))]] call[session.setAttribute, parameter[member[.CURRENT_RCPT_KEY], literal[null]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[initSession] operator[SEP] identifier[SMTPClientSession] identifier[session] operator[SEP] { identifier[Iterator] operator[<] identifier[SMTPDeliveryEnvelope] operator[>] identifier[transactionList] operator[=] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[SMTPDeliveryEnvelope] operator[>] operator[SEP] identifier[session] operator[SEP] identifier[getAttribute] operator[SEP] identifier[SMTP_TRANSACTIONS_KEY] operator[SEP] operator[SEP] operator[SEP] identifier[SMTPDeliveryEnvelope] identifier[transaction] operator[=] identifier[transactionList] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[session] operator[SEP] identifier[setAttribute] operator[SEP] identifier[CURRENT_SMTP_TRANSACTION_KEY] , identifier[transaction] operator[SEP] operator[SEP] identifier[session] operator[SEP] identifier[setAttribute] operator[SEP] identifier[RECIPIENTS_KEY] , identifier[transaction] operator[SEP] identifier[getRecipients] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[session] operator[SEP] identifier[setAttribute] operator[SEP] identifier[DELIVERY_STATUS_KEY] , Keyword[new] identifier[ArrayList] operator[<] identifier[DeliveryRecipientStatus] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[session] operator[SEP] identifier[setAttribute] operator[SEP] identifier[CURRENT_RCPT_KEY] , Other[null] operator[SEP] operator[SEP] }
public static void fillHermitian(ZMatrixRMaj A, double min, double max, Random rand) { if( A.numRows != A.numCols ) throw new IllegalArgumentException("A must be a square matrix"); double range = max-min; int length = A.numRows; for( int i = 0; i < length; i++ ) { A.set(i,i,rand.nextDouble()*range + min,0); for( int j = i+1; j < length; j++ ) { double real = rand.nextDouble()*range + min; double imaginary = rand.nextDouble()*range + min; A.set(i,j,real,imaginary); A.set(j,i,real,-imaginary); } } }
class class_name[name] begin[{] method[fillHermitian, return_type[void], modifier[public static], parameter[A, min, max, rand]] begin[{] if[binary_operation[member[A.numRows], !=, member[A.numCols]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="A must be a square matrix")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[double], range] local_variable[type[int], length] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=nextDouble, postfix_operators=[], prefix_operators=[], qualifier=rand, selectors=[], type_arguments=None), operandr=MemberReference(member=range, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=set, postfix_operators=[], prefix_operators=[], qualifier=A, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=nextDouble, postfix_operators=[], prefix_operators=[], qualifier=rand, selectors=[], type_arguments=None), operandr=MemberReference(member=range, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=real)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=nextDouble, postfix_operators=[], prefix_operators=[], qualifier=rand, selectors=[], type_arguments=None), operandr=MemberReference(member=range, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=imaginary)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=real, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=imaginary, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=A, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=real, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=imaginary, postfix_operators=[], prefix_operators=['-'], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=A, selectors=[], type_arguments=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=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[fillHermitian] operator[SEP] identifier[ZMatrixRMaj] identifier[A] , Keyword[double] identifier[min] , Keyword[double] identifier[max] , identifier[Random] identifier[rand] operator[SEP] { Keyword[if] operator[SEP] identifier[A] operator[SEP] identifier[numRows] operator[!=] identifier[A] operator[SEP] identifier[numCols] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[double] identifier[range] operator[=] identifier[max] operator[-] identifier[min] operator[SEP] Keyword[int] identifier[length] operator[=] identifier[A] operator[SEP] identifier[numRows] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[A] operator[SEP] identifier[set] operator[SEP] identifier[i] , identifier[i] , identifier[rand] operator[SEP] identifier[nextDouble] operator[SEP] operator[SEP] operator[*] identifier[range] operator[+] identifier[min] , Other[0] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[i] operator[+] Other[1] operator[SEP] identifier[j] operator[<] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[double] identifier[real] operator[=] identifier[rand] operator[SEP] identifier[nextDouble] operator[SEP] operator[SEP] operator[*] identifier[range] operator[+] identifier[min] operator[SEP] Keyword[double] identifier[imaginary] operator[=] identifier[rand] operator[SEP] identifier[nextDouble] operator[SEP] operator[SEP] operator[*] identifier[range] operator[+] identifier[min] operator[SEP] identifier[A] operator[SEP] identifier[set] operator[SEP] identifier[i] , identifier[j] , identifier[real] , identifier[imaginary] operator[SEP] operator[SEP] identifier[A] operator[SEP] identifier[set] operator[SEP] identifier[j] , identifier[i] , identifier[real] , operator[-] identifier[imaginary] operator[SEP] operator[SEP] } } }
private NamedTemplate readTemplateWithName(CmsObject cms, String path) { try { CmsResource resource = cms.readResource(path, CmsResourceFilter.IGNORE_EXPIRATION); String name = getTemplateName(cms, resource); return new NamedTemplate(resource, name); } catch (Exception e) { return null; } }
class class_name[name] begin[{] method[readTemplateWithName, return_type[type[NamedTemplate]], modifier[private], parameter[cms, path]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=IGNORE_EXPIRATION, postfix_operators=[], prefix_operators=[], qualifier=CmsResourceFilter, selectors=[])], member=readResource, postfix_operators=[], prefix_operators=[], qualifier=cms, selectors=[], type_arguments=None), name=resource)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsResource, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=cms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTemplateName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NamedTemplate, sub_type=None)), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] identifier[NamedTemplate] identifier[readTemplateWithName] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[String] identifier[path] operator[SEP] { Keyword[try] { identifier[CmsResource] identifier[resource] operator[=] identifier[cms] operator[SEP] identifier[readResource] operator[SEP] identifier[path] , identifier[CmsResourceFilter] operator[SEP] identifier[IGNORE_EXPIRATION] operator[SEP] operator[SEP] identifier[String] identifier[name] operator[=] identifier[getTemplateName] operator[SEP] identifier[cms] , identifier[resource] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[NamedTemplate] operator[SEP] identifier[resource] , identifier[name] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] Other[null] operator[SEP] } }
public static String readFromFileIntoString(File file) throws IOException { FileInputStream inputStream = new FileInputStream(file); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8")); StringBuilder text = new StringBuilder(); String line; while( (line = reader.readLine()) != null) { text.append(line).append("\n"); } inputStream.close(); return text.toString(); }
class class_name[name] begin[{] method[readFromFileIntoString, return_type[type[String]], modifier[public static], parameter[file]] begin[{] local_variable[type[FileInputStream], inputStream] local_variable[type[BufferedReader], reader] local_variable[type[StringBuilder], text] local_variable[type[String], line] while[binary_operation[assign[member[.line], call[reader.readLine, parameter[]]], !=, literal[null]]] begin[{] call[text.append, parameter[member[.line]]] end[}] call[inputStream.close, parameter[]] return[call[text.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[readFromFileIntoString] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] { identifier[FileInputStream] identifier[inputStream] operator[=] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[file] operator[SEP] operator[SEP] identifier[BufferedReader] identifier[reader] operator[=] Keyword[new] identifier[BufferedReader] operator[SEP] Keyword[new] identifier[InputStreamReader] operator[SEP] identifier[inputStream] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[text] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[line] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[line] operator[=] identifier[reader] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[text] operator[SEP] identifier[append] operator[SEP] identifier[line] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[inputStream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[text] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static double getRefRMSD(List<Atom[]> transformed, int reference) { double sumSqDist = 0; int totalLength = 0; for (int c = 0; c < transformed.get(reference).length; c++) { Atom refAtom = transformed.get(reference)[c]; if (refAtom == null) continue; double nonNullSqDist = 0; int nonNullLength = 0; for (int r = 0; r < transformed.size(); r++) { if (r == reference) continue; Atom atom = transformed.get(r)[c]; if (atom != null) { nonNullSqDist += Calc.getDistanceFast(refAtom, atom); nonNullLength++; } } if (nonNullLength > 0) { totalLength++; sumSqDist += nonNullSqDist / nonNullLength; } } return Math.sqrt(sumSqDist / totalLength); }
class class_name[name] begin[{] method[getRefRMSD, return_type[type[double]], modifier[public static], parameter[transformed, reference]] begin[{] local_variable[type[double], sumSqDist] local_variable[type[int], totalLength] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=transformed, selectors=[ArraySelector(index=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))], type_arguments=None), name=refAtom)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Atom, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=refAtom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=nonNullSqDist)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=nonNullLength)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=reference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=transformed, selectors=[ArraySelector(index=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))], type_arguments=None), name=atom)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Atom, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=atom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=nonNullSqDist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=refAtom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=atom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDistanceFast, postfix_operators=[], prefix_operators=[], qualifier=Calc, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=nonNullLength, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=transformed, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=r)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=r, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nonNullLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=totalLength, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=sumSqDist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=nonNullSqDist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nonNullLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=reference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=transformed, selectors=[MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=c, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[Math.sqrt, parameter[binary_operation[member[.sumSqDist], /, member[.totalLength]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[getRefRMSD] operator[SEP] identifier[List] operator[<] identifier[Atom] operator[SEP] operator[SEP] operator[>] identifier[transformed] , Keyword[int] identifier[reference] operator[SEP] { Keyword[double] identifier[sumSqDist] operator[=] Other[0] operator[SEP] Keyword[int] identifier[totalLength] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[c] operator[=] Other[0] operator[SEP] identifier[c] operator[<] identifier[transformed] operator[SEP] identifier[get] operator[SEP] identifier[reference] operator[SEP] operator[SEP] identifier[length] operator[SEP] identifier[c] operator[++] operator[SEP] { identifier[Atom] identifier[refAtom] operator[=] identifier[transformed] operator[SEP] identifier[get] operator[SEP] identifier[reference] operator[SEP] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[refAtom] operator[==] Other[null] operator[SEP] Keyword[continue] operator[SEP] Keyword[double] identifier[nonNullSqDist] operator[=] Other[0] operator[SEP] Keyword[int] identifier[nonNullLength] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[r] operator[=] Other[0] operator[SEP] identifier[r] operator[<] identifier[transformed] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[r] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[r] operator[==] identifier[reference] operator[SEP] Keyword[continue] operator[SEP] identifier[Atom] identifier[atom] operator[=] identifier[transformed] operator[SEP] identifier[get] operator[SEP] identifier[r] operator[SEP] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[atom] operator[!=] Other[null] operator[SEP] { identifier[nonNullSqDist] operator[+=] identifier[Calc] operator[SEP] identifier[getDistanceFast] operator[SEP] identifier[refAtom] , identifier[atom] operator[SEP] operator[SEP] identifier[nonNullLength] operator[++] operator[SEP] } } Keyword[if] operator[SEP] identifier[nonNullLength] operator[>] Other[0] operator[SEP] { identifier[totalLength] operator[++] operator[SEP] identifier[sumSqDist] operator[+=] identifier[nonNullSqDist] operator[/] identifier[nonNullLength] operator[SEP] } } Keyword[return] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[sumSqDist] operator[/] identifier[totalLength] operator[SEP] operator[SEP] }
public void close() { entry.close(); getBlockCounter().clear(); getSkipTagCounter().clear(); getCache().resetOrganismCache(); getCache().resetReferenceCache(); }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] call[entry.close, parameter[]] call[.getBlockCounter, parameter[]] call[.getSkipTagCounter, parameter[]] call[.getCache, parameter[]] call[.getCache, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] { identifier[entry] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[getBlockCounter] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[getSkipTagCounter] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[getCache] operator[SEP] operator[SEP] operator[SEP] identifier[resetOrganismCache] operator[SEP] operator[SEP] operator[SEP] identifier[getCache] operator[SEP] operator[SEP] operator[SEP] identifier[resetReferenceCache] operator[SEP] operator[SEP] operator[SEP] }
public boolean rename (Path src, Path dst) throws IOException { try (Closeable context = new TimerContextWithLog(renameTimer.time(), "rename", src, dst)) { return super.rename(src, dst); } }
class class_name[name] begin[{] method[rename, return_type[type[boolean]], modifier[public], parameter[src, dst]] begin[{] TryStatement(block=[ReturnStatement(expression=SuperMethodInvocation(arguments=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rename, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=context, type=ReferenceType(arguments=None, dimensions=[], name=Closeable, sub_type=None), value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=time, postfix_operators=[], prefix_operators=[], qualifier=renameTimer, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="rename"), MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dst, 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=TimerContextWithLog, sub_type=None)))]) end[}] END[}]
Keyword[public] Keyword[boolean] identifier[rename] operator[SEP] identifier[Path] identifier[src] , identifier[Path] identifier[dst] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] operator[SEP] identifier[Closeable] identifier[context] operator[=] Keyword[new] identifier[TimerContextWithLog] operator[SEP] identifier[renameTimer] operator[SEP] identifier[time] operator[SEP] operator[SEP] , literal[String] , identifier[src] , identifier[dst] operator[SEP] operator[SEP] { Keyword[return] Keyword[super] operator[SEP] identifier[rename] operator[SEP] identifier[src] , identifier[dst] operator[SEP] operator[SEP] } }
public V remove(Object key) { TreeMapEntry<K,V> p = getEntry(key); if (p == null) return null; V oldValue = p.value; deleteEntry(p); return oldValue; }
class class_name[name] begin[{] method[remove, return_type[type[V]], modifier[public], parameter[key]] begin[{] local_variable[type[TreeMapEntry], p] if[binary_operation[member[.p], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[V], oldValue] call[.deleteEntry, parameter[member[.p]]] return[member[.oldValue]] end[}] END[}]
Keyword[public] identifier[V] identifier[remove] operator[SEP] identifier[Object] identifier[key] operator[SEP] { identifier[TreeMapEntry] operator[<] identifier[K] , identifier[V] operator[>] identifier[p] operator[=] identifier[getEntry] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[p] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[V] identifier[oldValue] operator[=] identifier[p] operator[SEP] identifier[value] operator[SEP] identifier[deleteEntry] operator[SEP] identifier[p] operator[SEP] operator[SEP] Keyword[return] identifier[oldValue] operator[SEP] }
public SDVariable[] updateVariableNamesAndReferences(SDVariable[] variablesToUpdate, String[] newVariableNames) { int numVariables = variablesToUpdate.length; SDVariable[] updatedVariables = new SDVariable[numVariables]; for (int i = 0; i < numVariables; i++) { SDVariable varToUpdate = variablesToUpdate[i]; String name = newVariableNames == null ? null : newVariableNames[i]; updatedVariables[i] = updateVariableNameAndReference(varToUpdate, name); } return updatedVariables; }
class class_name[name] begin[{] method[updateVariableNamesAndReferences, return_type[type[SDVariable]], modifier[public], parameter[variablesToUpdate, newVariableNames]] begin[{] local_variable[type[int], numVariables] local_variable[type[SDVariable], updatedVariables] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=variablesToUpdate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=varToUpdate)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SDVariable, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=newVariableNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=newVariableNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=updatedVariables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=varToUpdate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=updateVariableNameAndReference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numVariables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.updatedVariables]] end[}] END[}]
Keyword[public] identifier[SDVariable] operator[SEP] operator[SEP] identifier[updateVariableNamesAndReferences] operator[SEP] identifier[SDVariable] operator[SEP] operator[SEP] identifier[variablesToUpdate] , identifier[String] operator[SEP] operator[SEP] identifier[newVariableNames] operator[SEP] { Keyword[int] identifier[numVariables] operator[=] identifier[variablesToUpdate] operator[SEP] identifier[length] operator[SEP] identifier[SDVariable] operator[SEP] operator[SEP] identifier[updatedVariables] operator[=] Keyword[new] identifier[SDVariable] operator[SEP] identifier[numVariables] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numVariables] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[SDVariable] identifier[varToUpdate] operator[=] identifier[variablesToUpdate] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[String] identifier[name] operator[=] identifier[newVariableNames] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[newVariableNames] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[updatedVariables] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[updateVariableNameAndReference] operator[SEP] identifier[varToUpdate] , identifier[name] operator[SEP] operator[SEP] } Keyword[return] identifier[updatedVariables] operator[SEP] }
public ServiceFuture<Tag> getTagAsync(UUID projectId, UUID tagId, GetTagOptionalParameter getTagOptionalParameter, final ServiceCallback<Tag> serviceCallback) { return ServiceFuture.fromResponse(getTagWithServiceResponseAsync(projectId, tagId, getTagOptionalParameter), serviceCallback); }
class class_name[name] begin[{] method[getTagAsync, return_type[type[ServiceFuture]], modifier[public], parameter[projectId, tagId, getTagOptionalParameter, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.getTagWithServiceResponseAsync, parameter[member[.projectId], member[.tagId], member[.getTagOptionalParameter]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[Tag] operator[>] identifier[getTagAsync] operator[SEP] identifier[UUID] identifier[projectId] , identifier[UUID] identifier[tagId] , identifier[GetTagOptionalParameter] identifier[getTagOptionalParameter] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[Tag] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[getTagWithServiceResponseAsync] operator[SEP] identifier[projectId] , identifier[tagId] , identifier[getTagOptionalParameter] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
protected String convertIdentifierPattern(final String pattern, boolean datanucleusFormat) { if (pattern == null) { return convertPattern("%", true); } else { return convertPattern(pattern, datanucleusFormat); } }
class class_name[name] begin[{] method[convertIdentifierPattern, return_type[type[String]], modifier[protected], parameter[pattern, datanucleusFormat]] begin[{] if[binary_operation[member[.pattern], ==, literal[null]]] begin[{] return[call[.convertPattern, parameter[literal["%"], literal[true]]]] else begin[{] return[call[.convertPattern, parameter[member[.pattern], member[.datanucleusFormat]]]] end[}] end[}] END[}]
Keyword[protected] identifier[String] identifier[convertIdentifierPattern] operator[SEP] Keyword[final] identifier[String] identifier[pattern] , Keyword[boolean] identifier[datanucleusFormat] operator[SEP] { Keyword[if] operator[SEP] identifier[pattern] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[convertPattern] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[convertPattern] operator[SEP] identifier[pattern] , identifier[datanucleusFormat] operator[SEP] operator[SEP] } }
public void appendDim(int size, String name) { DArrayDimension newDim = new DArrayDimension(size, name); dimVector.addElement(newDim); newDim.setContainer(this); }
class class_name[name] begin[{] method[appendDim, return_type[void], modifier[public], parameter[size, name]] begin[{] local_variable[type[DArrayDimension], newDim] call[dimVector.addElement, parameter[member[.newDim]]] call[newDim.setContainer, parameter[THIS[]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[appendDim] operator[SEP] Keyword[int] identifier[size] , identifier[String] identifier[name] operator[SEP] { identifier[DArrayDimension] identifier[newDim] operator[=] Keyword[new] identifier[DArrayDimension] operator[SEP] identifier[size] , identifier[name] operator[SEP] operator[SEP] identifier[dimVector] operator[SEP] identifier[addElement] operator[SEP] identifier[newDim] operator[SEP] operator[SEP] identifier[newDim] operator[SEP] identifier[setContainer] operator[SEP] Keyword[this] operator[SEP] operator[SEP] }
public void mandateTransaction() throws TransactionRequiredLocalException { try { final Transaction tx = getTransaction(); if (tx == null) throw new TransactionRequiredLocalException( "Transaction Mandatory"); final int status = tx.getStatus(); if (status != Status.STATUS_ACTIVE && status != Status.STATUS_MARKED_ROLLBACK) { throw new IllegalStateException( "There is no active tx, tx is in state: " + status); } } catch (SystemException e) { throw new SLEEException(e.getMessage(),e); } }
class class_name[name] begin[{] method[mandateTransaction, return_type[void], modifier[public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getTransaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=tx)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Transaction, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tx, 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=ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Transaction Mandatory")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TransactionRequiredLocalException, sub_type=None)), label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=tx, selectors=[], type_arguments=None), name=status)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=STATUS_ACTIVE, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[]), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=STATUS_MARKED_ROLLBACK, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[]), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="There is no active tx, tx is in state: "), operandr=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SLEEException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SystemException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[mandateTransaction] operator[SEP] operator[SEP] Keyword[throws] identifier[TransactionRequiredLocalException] { Keyword[try] { Keyword[final] identifier[Transaction] identifier[tx] operator[=] identifier[getTransaction] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tx] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[TransactionRequiredLocalException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[status] operator[=] identifier[tx] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[status] operator[!=] identifier[Status] operator[SEP] identifier[STATUS_ACTIVE] operator[&&] identifier[status] operator[!=] identifier[Status] operator[SEP] identifier[STATUS_MARKED_ROLLBACK] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[status] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[SystemException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SLEEException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public String format(String format) { CharBuffer cb = new CharBuffer(); return format(cb, format).close(); }
class class_name[name] begin[{] method[format, return_type[type[String]], modifier[public], parameter[format]] begin[{] local_variable[type[CharBuffer], cb] return[call[.format, parameter[member[.cb], member[.format]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[format] operator[SEP] identifier[String] identifier[format] operator[SEP] { identifier[CharBuffer] identifier[cb] operator[=] Keyword[new] identifier[CharBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[format] operator[SEP] identifier[cb] , identifier[format] operator[SEP] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] }
private static DimFilter buildTimeFloorFilter( final String column, final Granularity granularity, final SqlKind operatorKind, final long rhsMillis ) { final BoundRefKey boundRefKey = new BoundRefKey(column, null, StringComparators.NUMERIC); final Interval rhsInterval = granularity.bucket(DateTimes.utc(rhsMillis)); // Is rhs aligned on granularity boundaries? final boolean rhsAligned = rhsInterval.getStartMillis() == rhsMillis; return getBoundTimeDimFilter(operatorKind, boundRefKey, rhsInterval, rhsAligned); }
class class_name[name] begin[{] method[buildTimeFloorFilter, return_type[type[DimFilter]], modifier[private static], parameter[column, granularity, operatorKind, rhsMillis]] begin[{] local_variable[type[BoundRefKey], boundRefKey] local_variable[type[Interval], rhsInterval] local_variable[type[boolean], rhsAligned] return[call[.getBoundTimeDimFilter, parameter[member[.operatorKind], member[.boundRefKey], member[.rhsInterval], member[.rhsAligned]]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[DimFilter] identifier[buildTimeFloorFilter] operator[SEP] Keyword[final] identifier[String] identifier[column] , Keyword[final] identifier[Granularity] identifier[granularity] , Keyword[final] identifier[SqlKind] identifier[operatorKind] , Keyword[final] Keyword[long] identifier[rhsMillis] operator[SEP] { Keyword[final] identifier[BoundRefKey] identifier[boundRefKey] operator[=] Keyword[new] identifier[BoundRefKey] operator[SEP] identifier[column] , Other[null] , identifier[StringComparators] operator[SEP] identifier[NUMERIC] operator[SEP] operator[SEP] Keyword[final] identifier[Interval] identifier[rhsInterval] operator[=] identifier[granularity] operator[SEP] identifier[bucket] operator[SEP] identifier[DateTimes] operator[SEP] identifier[utc] operator[SEP] identifier[rhsMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[rhsAligned] operator[=] identifier[rhsInterval] operator[SEP] identifier[getStartMillis] operator[SEP] operator[SEP] operator[==] identifier[rhsMillis] operator[SEP] Keyword[return] identifier[getBoundTimeDimFilter] operator[SEP] identifier[operatorKind] , identifier[boundRefKey] , identifier[rhsInterval] , identifier[rhsAligned] operator[SEP] operator[SEP] }
public void setServer (String hostname, int[] ports, int[] datagramPorts) { _hostname = hostname; _ports = ports; _datagramPorts = datagramPorts; }
class class_name[name] begin[{] method[setServer, return_type[void], modifier[public], parameter[hostname, ports, datagramPorts]] begin[{] assign[member[._hostname], member[.hostname]] assign[member[._ports], member[.ports]] assign[member[._datagramPorts], member[.datagramPorts]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setServer] operator[SEP] identifier[String] identifier[hostname] , Keyword[int] operator[SEP] operator[SEP] identifier[ports] , Keyword[int] operator[SEP] operator[SEP] identifier[datagramPorts] operator[SEP] { identifier[_hostname] operator[=] identifier[hostname] operator[SEP] identifier[_ports] operator[=] identifier[ports] operator[SEP] identifier[_datagramPorts] operator[=] identifier[datagramPorts] operator[SEP] }
public String getUser() { if (tc.isEntryEnabled()) { SibTr.entry(tc, "getUser"); SibTr.exit(tc, "getUser", user); } return user; }
class class_name[name] begin[{] method[getUser, return_type[type[String]], modifier[public], parameter[]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["getUser"]]] call[SibTr.exit, parameter[member[.tc], literal["getUser"], member[.user]]] else begin[{] None end[}] return[member[.user]] end[}] END[}]
Keyword[public] identifier[String] identifier[getUser] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[user] operator[SEP] operator[SEP] } Keyword[return] identifier[user] operator[SEP] }
protected void setupMavenPaths() { super.setupMavenPaths(); final Resource resource = new Resource(); resource.setDirectory(getGenerateDirectory().getPath()); for (String resourceInclude : resourceIncludes) { resource.addInclude(resourceInclude); } getProject().addResource(resource); if (this.roundtripTestClassName != null) { getProject().addTestCompileSourceRoot( getGenerateDirectory().getPath()); } }
class class_name[name] begin[{] method[setupMavenPaths, return_type[void], modifier[protected], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=setupMavenPaths, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) local_variable[type[Resource], resource] call[resource.setDirectory, parameter[call[.getGenerateDirectory, parameter[]]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resourceInclude, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addInclude, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=resourceIncludes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=resourceInclude)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[.getProject, parameter[]] if[binary_operation[THIS[member[None.roundtripTestClassName]], !=, literal[null]]] begin[{] call[.getProject, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[setupMavenPaths] operator[SEP] operator[SEP] { Keyword[super] operator[SEP] identifier[setupMavenPaths] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Resource] identifier[resource] operator[=] Keyword[new] identifier[Resource] operator[SEP] operator[SEP] operator[SEP] identifier[resource] operator[SEP] identifier[setDirectory] operator[SEP] identifier[getGenerateDirectory] operator[SEP] operator[SEP] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[resourceInclude] operator[:] identifier[resourceIncludes] operator[SEP] { identifier[resource] operator[SEP] identifier[addInclude] operator[SEP] identifier[resourceInclude] operator[SEP] operator[SEP] } identifier[getProject] operator[SEP] operator[SEP] operator[SEP] identifier[addResource] operator[SEP] identifier[resource] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[roundtripTestClassName] operator[!=] Other[null] operator[SEP] { identifier[getProject] operator[SEP] operator[SEP] operator[SEP] identifier[addTestCompileSourceRoot] operator[SEP] identifier[getGenerateDirectory] operator[SEP] operator[SEP] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static Config buildConfig(TopologyDef topologyDef) { // merge contents of `config` into topology config Config conf = new Config(); conf.putAll(topologyDef.getConfig()); return conf; }
class class_name[name] begin[{] method[buildConfig, return_type[type[Config]], modifier[public static], parameter[topologyDef]] begin[{] local_variable[type[Config], conf] call[conf.putAll, parameter[call[topologyDef.getConfig, parameter[]]]] return[member[.conf]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Config] identifier[buildConfig] operator[SEP] identifier[TopologyDef] identifier[topologyDef] operator[SEP] { identifier[Config] identifier[conf] operator[=] Keyword[new] identifier[Config] operator[SEP] operator[SEP] operator[SEP] identifier[conf] operator[SEP] identifier[putAll] operator[SEP] identifier[topologyDef] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[conf] operator[SEP] }
public static boolean optBoolean(JSONObject object, String key) { return !object.isNull(key) && object.getBoolean(key); }
class class_name[name] begin[{] method[optBoolean, return_type[type[boolean]], modifier[public static], parameter[object, key]] begin[{] return[binary_operation[call[object.isNull, parameter[member[.key]]], &&, call[object.getBoolean, parameter[member[.key]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[optBoolean] operator[SEP] identifier[JSONObject] identifier[object] , identifier[String] identifier[key] operator[SEP] { Keyword[return] operator[!] identifier[object] operator[SEP] identifier[isNull] operator[SEP] identifier[key] operator[SEP] operator[&&] identifier[object] operator[SEP] identifier[getBoolean] operator[SEP] identifier[key] operator[SEP] operator[SEP] }
@Override public void execute(TaskExecutionContext context) { // e.g. error handling debugFw("...Beginning the cron4j task (before run): {}", jobType); final TaskExecutionContext nativeContext; final OptionalThing<LaunchNowOption> nowOption; if (context instanceof RomanticCron4jTaskExecutionContext) { final RomanticCron4jTaskExecutionContext romantic = (RomanticCron4jTaskExecutionContext) context; nativeContext = romantic.getNativeContext(); nowOption = romantic.getLaunchNowOption(); } else { nativeContext = context; nowOption = OptionalThing.empty(); } try { final LocalDateTime activationTime = currentTime.get(); final Cron4jJob job = findJob(); final Thread jobThread = Thread.currentThread(); RunnerResult runnerResult = null; Throwable controllerCause = null; try { debugFw("...Calling doExecute() of task (before run)"); runnerResult = doExecute(job, nativeContext, nowOption); // not null if (canTriggerNext(job, runnerResult)) { debugFw("...Calling triggerNext() of job in task (after run)"); job.triggerNext(); // should be after current job ending } } catch (JobConcurrentlyExecutingException e) { // these catch statements are related to deriveRunnerExecResultType() debugFw("...Calling catch clause of job concurrently executing exception: {}", e.getClass().getSimpleName()); final String msg = "Cannot execute the job task by concurrent execution: " + varyingCron + ", " + jobType.getSimpleName(); error(OptionalThing.of(job), msg, e); controllerCause = e; } catch (Throwable cause) { // from framework part (exception in appilcation job are already handled) debugFw("...Calling catch clause of job controller's exception: {}", cause.getClass().getSimpleName()); final String msg = "Failed to execute the job task: " + varyingCron + ", " + jobType.getSimpleName(); error(OptionalThing.of(job), msg, cause); controllerCause = cause; } final OptionalThing<RunnerResult> optRunnerResult = optRunnerResult(runnerResult); // empty when error final OptionalThing<LocalDateTime> endTime = deriveEndTime(optRunnerResult); debugFw("...Calling recordJobHistory() of task (after run): {}, {}", optRunnerResult, endTime); recordJobHistory(nativeContext, job, jobThread, activationTime, optRunnerResult, endTime, optControllerCause(controllerCause)); debugFw("...Ending the cron4j task (after run): {}, {}", optRunnerResult, endTime); } catch (Throwable coreCause) { // controller dead final String msg = "Failed to control the job task: " + varyingCron + ", " + jobType.getSimpleName(); error(OptionalThing.empty(), msg, coreCause); } }
class class_name[name] begin[{] method[execute, return_type[void], modifier[public], parameter[context]] begin[{] call[.debugFw, parameter[literal["...Beginning the cron4j task (before run): {}"], member[.jobType]]] local_variable[type[TaskExecutionContext], nativeContext] local_variable[type[OptionalThing], nowOption] if[binary_operation[member[.context], instanceof, type[RomanticCron4jTaskExecutionContext]]] begin[{] local_variable[type[RomanticCron4jTaskExecutionContext], romantic] assign[member[.nativeContext], call[romantic.getNativeContext, parameter[]]] assign[member[.nowOption], call[romantic.getLaunchNowOption, parameter[]]] else begin[{] assign[member[.nativeContext], member[.context]] assign[member[.nowOption], call[OptionalThing.empty, parameter[]]] end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=currentTime, selectors=[], type_arguments=None), name=activationTime)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=LocalDateTime, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=findJob, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=job)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Cron4jJob, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[], type_arguments=None), name=jobThread)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Thread, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=runnerResult)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RunnerResult, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=controllerCause)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Throwable, sub_type=None)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="...Calling doExecute() of task (before run)")], member=debugFw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=runnerResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=job, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nativeContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nowOption, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doExecute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=job, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=runnerResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=canTriggerNext, postfix_operators=[], prefix_operators=[], qualifier=, 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="...Calling triggerNext() of job in task (after run)")], member=debugFw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=triggerNext, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="...Calling catch clause of job concurrently executing exception: {}"), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=debugFw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot execute the job task by concurrent execution: "), operandr=MemberReference(member=varyingCron, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=[], prefix_operators=[], qualifier=jobType, selectors=[], type_arguments=None), operator=+), name=msg)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=job, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=OptionalThing, selectors=[], type_arguments=None), MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=controllerCause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JobConcurrentlyExecutingException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="...Calling catch clause of job controller's exception: {}"), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=cause, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=debugFw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to execute the job task: "), operandr=MemberReference(member=varyingCron, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=[], prefix_operators=[], qualifier=jobType, selectors=[], type_arguments=None), operator=+), name=msg)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=job, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=OptionalThing, selectors=[], type_arguments=None), MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=controllerCause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=cause, types=['Throwable']))], finally_block=None, label=None, resources=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=runnerResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=optRunnerResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=optRunnerResult)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=RunnerResult, sub_type=None))], dimensions=[], name=OptionalThing, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=optRunnerResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deriveEndTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=endTime)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=LocalDateTime, sub_type=None))], dimensions=[], name=OptionalThing, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="...Calling recordJobHistory() of task (after run): {}, {}"), MemberReference(member=optRunnerResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=endTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debugFw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nativeContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=job, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=jobThread, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=activationTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=optRunnerResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=endTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=controllerCause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=optControllerCause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=recordJobHistory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="...Ending the cron4j task (after run): {}, {}"), MemberReference(member=optRunnerResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=endTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debugFw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to control the job task: "), operandr=MemberReference(member=varyingCron, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=[], prefix_operators=[], qualifier=jobType, selectors=[], type_arguments=None), operator=+), name=msg)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=empty, postfix_operators=[], prefix_operators=[], qualifier=OptionalThing, selectors=[], type_arguments=None), MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=coreCause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=coreCause, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[execute] operator[SEP] identifier[TaskExecutionContext] identifier[context] operator[SEP] { identifier[debugFw] operator[SEP] literal[String] , identifier[jobType] operator[SEP] operator[SEP] Keyword[final] identifier[TaskExecutionContext] identifier[nativeContext] operator[SEP] Keyword[final] identifier[OptionalThing] operator[<] identifier[LaunchNowOption] operator[>] identifier[nowOption] operator[SEP] Keyword[if] operator[SEP] identifier[context] Keyword[instanceof] identifier[RomanticCron4jTaskExecutionContext] operator[SEP] { Keyword[final] identifier[RomanticCron4jTaskExecutionContext] identifier[romantic] operator[=] operator[SEP] identifier[RomanticCron4jTaskExecutionContext] operator[SEP] identifier[context] operator[SEP] identifier[nativeContext] operator[=] identifier[romantic] operator[SEP] identifier[getNativeContext] operator[SEP] operator[SEP] operator[SEP] identifier[nowOption] operator[=] identifier[romantic] operator[SEP] identifier[getLaunchNowOption] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[nativeContext] operator[=] identifier[context] operator[SEP] identifier[nowOption] operator[=] identifier[OptionalThing] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { Keyword[final] identifier[LocalDateTime] identifier[activationTime] operator[=] identifier[currentTime] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Cron4jJob] identifier[job] operator[=] identifier[findJob] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Thread] identifier[jobThread] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[RunnerResult] identifier[runnerResult] operator[=] Other[null] operator[SEP] identifier[Throwable] identifier[controllerCause] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[debugFw] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[runnerResult] operator[=] identifier[doExecute] operator[SEP] identifier[job] , identifier[nativeContext] , identifier[nowOption] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[canTriggerNext] operator[SEP] identifier[job] , identifier[runnerResult] operator[SEP] operator[SEP] { identifier[debugFw] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[job] operator[SEP] identifier[triggerNext] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[JobConcurrentlyExecutingException] identifier[e] operator[SEP] { identifier[debugFw] operator[SEP] literal[String] , identifier[e] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[msg] operator[=] literal[String] operator[+] identifier[varyingCron] operator[+] literal[String] operator[+] identifier[jobType] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] identifier[error] operator[SEP] identifier[OptionalThing] operator[SEP] identifier[of] operator[SEP] identifier[job] operator[SEP] , identifier[msg] , identifier[e] operator[SEP] operator[SEP] identifier[controllerCause] operator[=] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[cause] operator[SEP] { identifier[debugFw] operator[SEP] literal[String] , identifier[cause] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[msg] operator[=] literal[String] operator[+] identifier[varyingCron] operator[+] literal[String] operator[+] identifier[jobType] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] identifier[error] operator[SEP] identifier[OptionalThing] operator[SEP] identifier[of] operator[SEP] identifier[job] operator[SEP] , identifier[msg] , identifier[cause] operator[SEP] operator[SEP] identifier[controllerCause] operator[=] identifier[cause] operator[SEP] } Keyword[final] identifier[OptionalThing] operator[<] identifier[RunnerResult] operator[>] identifier[optRunnerResult] operator[=] identifier[optRunnerResult] operator[SEP] identifier[runnerResult] operator[SEP] operator[SEP] Keyword[final] identifier[OptionalThing] operator[<] identifier[LocalDateTime] operator[>] identifier[endTime] operator[=] identifier[deriveEndTime] operator[SEP] identifier[optRunnerResult] operator[SEP] operator[SEP] identifier[debugFw] operator[SEP] literal[String] , identifier[optRunnerResult] , identifier[endTime] operator[SEP] operator[SEP] identifier[recordJobHistory] operator[SEP] identifier[nativeContext] , identifier[job] , identifier[jobThread] , identifier[activationTime] , identifier[optRunnerResult] , identifier[endTime] , identifier[optControllerCause] operator[SEP] identifier[controllerCause] operator[SEP] operator[SEP] operator[SEP] identifier[debugFw] operator[SEP] literal[String] , identifier[optRunnerResult] , identifier[endTime] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[coreCause] operator[SEP] { Keyword[final] identifier[String] identifier[msg] operator[=] literal[String] operator[+] identifier[varyingCron] operator[+] literal[String] operator[+] identifier[jobType] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] identifier[error] operator[SEP] identifier[OptionalThing] operator[SEP] identifier[empty] operator[SEP] operator[SEP] , identifier[msg] , identifier[coreCause] operator[SEP] operator[SEP] } }
private Model getModel(FileResource item, Scanner scanner) throws IOException { PomModelBuilder pomModelBuilder = scanner.getContext().peekOrDefault(PomModelBuilder.class, null); if (pomModelBuilder != null) { return pomModelBuilder.getModel(item.getFile()); } Model model = null; try (InputStream stream = item.createStream()) { model = mavenXpp3Reader.read(stream); } catch (XmlPullParserException e) { String msg = "Cannot read POM descriptor from " + item.getFile().getAbsolutePath() + "."; LOGGER.warn(msg, e); } return model; }
class class_name[name] begin[{] method[getModel, return_type[type[Model]], modifier[private], parameter[item, scanner]] begin[{] local_variable[type[PomModelBuilder], pomModelBuilder] if[binary_operation[member[.pomModelBuilder], !=, literal[null]]] begin[{] return[call[pomModelBuilder.getModel, parameter[call[item.getFile, parameter[]]]]] else begin[{] None end[}] local_variable[type[Model], model] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=model, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=stream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=mavenXpp3Reader, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot read POM descriptor from "), operandr=MethodInvocation(arguments=[], member=getFile, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[MethodInvocation(arguments=[], member=getAbsolutePath, 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=+), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['XmlPullParserException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=stream, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=MethodInvocation(arguments=[], member=createStream, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None))]) return[member[.model]] end[}] END[}]
Keyword[private] identifier[Model] identifier[getModel] operator[SEP] identifier[FileResource] identifier[item] , identifier[Scanner] identifier[scanner] operator[SEP] Keyword[throws] identifier[IOException] { identifier[PomModelBuilder] identifier[pomModelBuilder] operator[=] identifier[scanner] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[peekOrDefault] operator[SEP] identifier[PomModelBuilder] operator[SEP] Keyword[class] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pomModelBuilder] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[pomModelBuilder] operator[SEP] identifier[getModel] operator[SEP] identifier[item] operator[SEP] identifier[getFile] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Model] identifier[model] operator[=] Other[null] operator[SEP] Keyword[try] operator[SEP] identifier[InputStream] identifier[stream] operator[=] identifier[item] operator[SEP] identifier[createStream] operator[SEP] operator[SEP] operator[SEP] { identifier[model] operator[=] identifier[mavenXpp3Reader] operator[SEP] identifier[read] operator[SEP] identifier[stream] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[XmlPullParserException] identifier[e] operator[SEP] { identifier[String] identifier[msg] operator[=] literal[String] operator[+] identifier[item] operator[SEP] identifier[getFile] operator[SEP] operator[SEP] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] identifier[msg] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[model] operator[SEP] }
public String doRemoveRunner() { try { getService().removeRunner(selectedRunnerName); } catch (GreenPepperServerException e) { addActionError(e.getId()); } return doGetRunners(); }
class class_name[name] begin[{] method[doRemoveRunner, return_type[type[String]], modifier[public], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getService, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=selectedRunnerName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeRunner, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=addActionError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['GreenPepperServerException']))], finally_block=None, label=None, resources=None) return[call[.doGetRunners, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[doRemoveRunner] operator[SEP] operator[SEP] { Keyword[try] { identifier[getService] operator[SEP] operator[SEP] operator[SEP] identifier[removeRunner] operator[SEP] identifier[selectedRunnerName] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[GreenPepperServerException] identifier[e] operator[SEP] { identifier[addActionError] operator[SEP] identifier[e] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[doGetRunners] operator[SEP] operator[SEP] operator[SEP] }
public Chronology getChronology(Object object, Chronology chrono) { if (chrono == null) { chrono = ((ReadableInstant) object).getChronology(); chrono = DateTimeUtils.getChronology(chrono); } return chrono; }
class class_name[name] begin[{] method[getChronology, return_type[type[Chronology]], modifier[public], parameter[object, chrono]] begin[{] if[binary_operation[member[.chrono], ==, literal[null]]] begin[{] assign[member[.chrono], Cast(expression=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ReadableInstant, sub_type=None))] assign[member[.chrono], call[DateTimeUtils.getChronology, parameter[member[.chrono]]]] else begin[{] None end[}] return[member[.chrono]] end[}] END[}]
Keyword[public] identifier[Chronology] identifier[getChronology] operator[SEP] identifier[Object] identifier[object] , identifier[Chronology] identifier[chrono] operator[SEP] { Keyword[if] operator[SEP] identifier[chrono] operator[==] Other[null] operator[SEP] { identifier[chrono] operator[=] operator[SEP] operator[SEP] identifier[ReadableInstant] operator[SEP] identifier[object] operator[SEP] operator[SEP] identifier[getChronology] operator[SEP] operator[SEP] operator[SEP] identifier[chrono] operator[=] identifier[DateTimeUtils] operator[SEP] identifier[getChronology] operator[SEP] identifier[chrono] operator[SEP] operator[SEP] } Keyword[return] identifier[chrono] operator[SEP] }
@Override public void removeByCommerceOrderId(long commerceOrderId) { for (CommerceOrderItem commerceOrderItem : findByCommerceOrderId( commerceOrderId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceOrderItem); } }
class class_name[name] begin[{] method[removeByCommerceOrderId, return_type[void], modifier[public], parameter[commerceOrderId]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=commerceOrderItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=commerceOrderId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=findByCommerceOrderId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=commerceOrderItem)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CommerceOrderItem, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByCommerceOrderId] operator[SEP] Keyword[long] identifier[commerceOrderId] operator[SEP] { Keyword[for] operator[SEP] identifier[CommerceOrderItem] identifier[commerceOrderItem] operator[:] identifier[findByCommerceOrderId] operator[SEP] identifier[commerceOrderId] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , Other[null] operator[SEP] operator[SEP] { identifier[remove] operator[SEP] identifier[commerceOrderItem] operator[SEP] operator[SEP] } }
public static boolean hideKeyboard(View view) { if (view == null) { throw new NullPointerException("View is null!"); } try { InputMethodManager imm = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); if (imm == null) { return false; } imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } catch (Exception e) { return false; } return true; }
class class_name[name] begin[{] method[hideKeyboard, return_type[type[boolean]], modifier[public static], parameter[view]] begin[{] if[binary_operation[member[.view], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="View is null!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getContext, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[MethodInvocation(arguments=[MemberReference(member=INPUT_METHOD_SERVICE, postfix_operators=[], prefix_operators=[], qualifier=Context, selectors=[])], member=getSystemService, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=InputMethodManager, sub_type=None)), name=imm)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputMethodManager, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=imm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getWindowToken, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=hideSoftInputFromWindow, postfix_operators=[], prefix_operators=[], qualifier=imm, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[hideKeyboard] operator[SEP] identifier[View] identifier[view] operator[SEP] { Keyword[if] operator[SEP] identifier[view] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[InputMethodManager] identifier[imm] operator[=] operator[SEP] identifier[InputMethodManager] operator[SEP] identifier[view] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[getSystemService] operator[SEP] identifier[Context] operator[SEP] identifier[INPUT_METHOD_SERVICE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[imm] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[imm] operator[SEP] identifier[hideSoftInputFromWindow] operator[SEP] identifier[view] operator[SEP] identifier[getWindowToken] operator[SEP] operator[SEP] , Other[0] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static IDifference construct(String name, Point2d first, Point2d second) { if (first == null && second == null) return null; Point2dDifference totalDiff = new Point2dDifference(name); totalDiff.addChild(DoubleDifference.construct("x", first == null ? null : first.x, second == null ? null : second.x)); totalDiff.addChild(DoubleDifference.construct("y", first == null ? null : first.y, second == null ? null : second.y)); if (totalDiff.childCount() == 0) { return null; } return totalDiff; }
class class_name[name] begin[{] method[construct, return_type[type[IDifference]], modifier[public static], parameter[name, first, second]] begin[{] if[binary_operation[binary_operation[member[.first], ==, literal[null]], &&, binary_operation[member[.second], ==, literal[null]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Point2dDifference], totalDiff] call[totalDiff.addChild, parameter[call[DoubleDifference.construct, parameter[literal["x"], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=first, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=second, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=second, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))]]]] call[totalDiff.addChild, parameter[call[DoubleDifference.construct, parameter[literal["y"], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=first, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=second, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=second, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))]]]] if[binary_operation[call[totalDiff.childCount, parameter[]], ==, literal[0]]] begin[{] return[literal[null]] else begin[{] None end[}] return[member[.totalDiff]] end[}] END[}]
Keyword[public] Keyword[static] identifier[IDifference] identifier[construct] operator[SEP] identifier[String] identifier[name] , identifier[Point2d] identifier[first] , identifier[Point2d] identifier[second] operator[SEP] { Keyword[if] operator[SEP] identifier[first] operator[==] Other[null] operator[&&] identifier[second] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[Point2dDifference] identifier[totalDiff] operator[=] Keyword[new] identifier[Point2dDifference] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[totalDiff] operator[SEP] identifier[addChild] operator[SEP] identifier[DoubleDifference] operator[SEP] identifier[construct] operator[SEP] literal[String] , identifier[first] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[first] operator[SEP] identifier[x] , identifier[second] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[second] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] identifier[totalDiff] operator[SEP] identifier[addChild] operator[SEP] identifier[DoubleDifference] operator[SEP] identifier[construct] operator[SEP] literal[String] , identifier[first] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[first] operator[SEP] identifier[y] , identifier[second] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[second] operator[SEP] identifier[y] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[totalDiff] operator[SEP] identifier[childCount] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[totalDiff] operator[SEP] }
private void checkForGaps() { if (mLayoutManager == null) { return; } final VirtualLayoutManager layoutManager = mLayoutManager.get(); if (layoutManager == null || layoutManager.getChildCount() == 0) { return; } final Range<Integer> range = getRange(); // align position, which should check gap for final int minPos, maxPos, alignPos; if (layoutManager.getReverseLayout()) { minPos = layoutManager.findLastVisibleItemPosition(); maxPos = layoutManager.findFirstVisibleItemPosition(); alignPos = range.getUpper() - 1; } else { minPos = layoutManager.findFirstVisibleItemPosition(); maxPos = layoutManager.findLastCompletelyVisibleItemPosition(); alignPos = range.getLower(); } final OrientationHelperEx orientationHelper = layoutManager.getMainOrientationHelper(); final int childCount = layoutManager.getChildCount(); int viewAnchor = Integer.MIN_VALUE; int alignLine = Integer.MIN_VALUE; // find view anchor and get align line, the views should be aligned to alignLine if (layoutManager.getReverseLayout()) { for (int i = childCount - 1; i >= 0; i--) { View view = layoutManager.getChildAt(i); int position = layoutManager.getPosition(view); if (position == alignPos) { viewAnchor = position; if (i == childCount - 1) { // if last child, alignLine is the end of child alignLine = orientationHelper.getDecoratedEnd(view); } else { // if not, alignLine is the start of next child View child = layoutManager.getChildAt(i + 1); int aPos = layoutManager.getPosition(child); if (aPos == position - 1) { // if position is sequence, which means the next child is not hidden one alignLine = orientationHelper.getDecoratedStart(child) - layoutManager.obtainExtraMargin(child, false) + layoutManager.obtainExtraMargin(view, true); } else { // if next child is hidden one, use end of current view alignLine = orientationHelper.getDecoratedEnd(view); } } break; } } } else { for (int i = 0; i < childCount; i++) { View view = layoutManager.getChildAt(i); int position = layoutManager.getPosition(view); if (position == alignPos) { viewAnchor = position; if (i == 0) { // TODO: there is problem // if first child, alignLine is the start alignLine = orientationHelper.getDecoratedStart(view); } else { // if not, alignLine is the end of previous child View child = layoutManager.getChildAt(i - 1); alignLine = orientationHelper.getDecoratedEnd(child) + layoutManager.obtainExtraMargin(child, true, false) - layoutManager.obtainExtraMargin(view, false, false); int viewStart = orientationHelper.getDecoratedStart(view); if (alignLine == viewStart) { //actually not gap here skip; viewAnchor = Integer.MIN_VALUE; } else { int nextPosition = layoutManager.getPosition(child); if (nextPosition != alignPos - 1) { //may has sticky layout, add extra space occur by stickyLayoutHelper LayoutHelper layoutHelper = layoutManager.findLayoutHelperByPosition(alignPos - 1); if (layoutHelper != null && layoutHelper instanceof StickyLayoutHelper) { if (layoutHelper.getFixedView() != null) { alignLine += layoutHelper.getFixedView().getMeasuredHeight(); } } } else { LayoutHelper layoutHelper = layoutManager.findLayoutHelperByPosition(nextPosition); layoutHelper.getRange(); } } } break; } } } if (viewAnchor == Integer.MIN_VALUE) { // if not find view anchor, break return; } View gapView = hasGapsToFix(layoutManager, viewAnchor, alignLine); if (gapView != null) { //FIXME do not clear loopup, may cause lane error while scroll //mLazySpanLookup.clear(); for (int i = 0, size = mSpans.length; i < size; i++) { Span span = mSpans[i]; span.setLine(alignLine); } layoutManager.requestSimpleAnimationsInNextLayout(); layoutManager.requestLayout(); } }
class class_name[name] begin[{] method[checkForGaps, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[member[.mLayoutManager], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[VirtualLayoutManager], layoutManager] if[binary_operation[binary_operation[member[.layoutManager], ==, literal[null]], ||, binary_operation[call[layoutManager.getChildCount, parameter[]], ==, literal[0]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[Range], range] local_variable[type[int], minPos] if[call[layoutManager.getReverseLayout, parameter[]]] begin[{] assign[member[.minPos], call[layoutManager.findLastVisibleItemPosition, parameter[]]] assign[member[.maxPos], call[layoutManager.findFirstVisibleItemPosition, parameter[]]] assign[member[.alignPos], binary_operation[call[range.getUpper, parameter[]], -, literal[1]]] else begin[{] assign[member[.minPos], call[layoutManager.findFirstVisibleItemPosition, parameter[]]] assign[member[.maxPos], call[layoutManager.findLastCompletelyVisibleItemPosition, parameter[]]] assign[member[.alignPos], call[range.getLower, parameter[]]] end[}] local_variable[type[OrientationHelperEx], orientationHelper] local_variable[type[int], childCount] local_variable[type[int], viewAnchor] local_variable[type[int], alignLine] if[call[layoutManager.getReverseLayout, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getChildAt, postfix_operators=[], prefix_operators=[], qualifier=layoutManager, selectors=[], type_arguments=None), name=view)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=View, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=view, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPosition, postfix_operators=[], prefix_operators=[], qualifier=layoutManager, selectors=[], type_arguments=None), name=position)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=alignPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=viewAnchor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=childCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator===), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=getChildAt, postfix_operators=[], prefix_operators=[], qualifier=layoutManager, selectors=[], type_arguments=None), name=child)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=View, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPosition, postfix_operators=[], prefix_operators=[], qualifier=layoutManager, selectors=[], type_arguments=None), name=aPos)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=aPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alignLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=view, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDecoratedEnd, postfix_operators=[], prefix_operators=[], qualifier=orientationHelper, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alignLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDecoratedStart, postfix_operators=[], prefix_operators=[], qualifier=orientationHelper, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=obtainExtraMargin, postfix_operators=[], prefix_operators=[], qualifier=layoutManager, selectors=[], type_arguments=None), operator=-), operandr=MethodInvocation(arguments=[MemberReference(member=view, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=obtainExtraMargin, postfix_operators=[], prefix_operators=[], qualifier=layoutManager, selectors=[], type_arguments=None), operator=+)), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alignLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=view, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDecoratedEnd, postfix_operators=[], prefix_operators=[], qualifier=orientationHelper, selectors=[], type_arguments=None)), label=None)])), BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=childCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getChildAt, postfix_operators=[], prefix_operators=[], qualifier=layoutManager, selectors=[], type_arguments=None), name=view)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=View, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=view, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPosition, postfix_operators=[], prefix_operators=[], qualifier=layoutManager, selectors=[], type_arguments=None), name=position)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=alignPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=viewAnchor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=getChildAt, postfix_operators=[], prefix_operators=[], qualifier=layoutManager, selectors=[], type_arguments=None), name=child)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=View, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=alignLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDecoratedEnd, postfix_operators=[], prefix_operators=[], qualifier=orientationHelper, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=child, 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=obtainExtraMargin, postfix_operators=[], prefix_operators=[], qualifier=layoutManager, selectors=[], type_arguments=None), operator=+), operandr=MethodInvocation(arguments=[MemberReference(member=view, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=obtainExtraMargin, postfix_operators=[], prefix_operators=[], qualifier=layoutManager, selectors=[], type_arguments=None), operator=-)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=view, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDecoratedStart, postfix_operators=[], prefix_operators=[], qualifier=orientationHelper, selectors=[], type_arguments=None), name=viewStart)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=alignLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=viewStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPosition, postfix_operators=[], prefix_operators=[], qualifier=layoutManager, selectors=[], type_arguments=None), name=nextPosition)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nextPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=alignPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=!=), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=nextPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findLayoutHelperByPosition, postfix_operators=[], prefix_operators=[], qualifier=layoutManager, selectors=[], type_arguments=None), name=layoutHelper)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LayoutHelper, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getRange, postfix_operators=[], prefix_operators=[], qualifier=layoutHelper, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=alignPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=findLayoutHelperByPosition, postfix_operators=[], prefix_operators=[], qualifier=layoutManager, selectors=[], type_arguments=None), name=layoutHelper)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LayoutHelper, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=layoutHelper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=layoutHelper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=StickyLayoutHelper, sub_type=None), operator=instanceof), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getFixedView, postfix_operators=[], prefix_operators=[], qualifier=layoutHelper, 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=Assignment(expressionl=MemberReference(member=alignLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=getFixedView, postfix_operators=[], prefix_operators=[], qualifier=layoutHelper, selectors=[MethodInvocation(arguments=[], member=getMeasuredHeight, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]))]))]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=viewAnchor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=MIN_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[])), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alignLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=view, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDecoratedStart, postfix_operators=[], prefix_operators=[], qualifier=orientationHelper, selectors=[], type_arguments=None)), label=None)])), BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=childCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] if[binary_operation[member[.viewAnchor], ==, member[Integer.MIN_VALUE]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[View], gapView] if[binary_operation[member[.gapView], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=mSpans, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=span)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Span, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=alignLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setLine, postfix_operators=[], prefix_operators=[], qualifier=span, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i), VariableDeclarator(dimensions=[], initializer=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=mSpans, selectors=[]), name=size)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[layoutManager.requestSimpleAnimationsInNextLayout, parameter[]] call[layoutManager.requestLayout, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[checkForGaps] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[mLayoutManager] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } Keyword[final] identifier[VirtualLayoutManager] identifier[layoutManager] operator[=] identifier[mLayoutManager] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[layoutManager] operator[==] Other[null] operator[||] identifier[layoutManager] operator[SEP] identifier[getChildCount] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] operator[SEP] } Keyword[final] identifier[Range] operator[<] identifier[Integer] operator[>] identifier[range] operator[=] identifier[getRange] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[minPos] , identifier[maxPos] , identifier[alignPos] operator[SEP] Keyword[if] operator[SEP] identifier[layoutManager] operator[SEP] identifier[getReverseLayout] operator[SEP] operator[SEP] operator[SEP] { identifier[minPos] operator[=] identifier[layoutManager] operator[SEP] identifier[findLastVisibleItemPosition] operator[SEP] operator[SEP] operator[SEP] identifier[maxPos] operator[=] identifier[layoutManager] operator[SEP] identifier[findFirstVisibleItemPosition] operator[SEP] operator[SEP] operator[SEP] identifier[alignPos] operator[=] identifier[range] operator[SEP] identifier[getUpper] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] } Keyword[else] { identifier[minPos] operator[=] identifier[layoutManager] operator[SEP] identifier[findFirstVisibleItemPosition] operator[SEP] operator[SEP] operator[SEP] identifier[maxPos] operator[=] identifier[layoutManager] operator[SEP] identifier[findLastCompletelyVisibleItemPosition] operator[SEP] operator[SEP] operator[SEP] identifier[alignPos] operator[=] identifier[range] operator[SEP] identifier[getLower] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[OrientationHelperEx] identifier[orientationHelper] operator[=] identifier[layoutManager] operator[SEP] identifier[getMainOrientationHelper] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[childCount] operator[=] identifier[layoutManager] operator[SEP] identifier[getChildCount] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[viewAnchor] operator[=] identifier[Integer] operator[SEP] identifier[MIN_VALUE] operator[SEP] Keyword[int] identifier[alignLine] operator[=] identifier[Integer] operator[SEP] identifier[MIN_VALUE] operator[SEP] Keyword[if] operator[SEP] identifier[layoutManager] operator[SEP] identifier[getReverseLayout] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[childCount] operator[-] Other[1] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] identifier[i] operator[--] operator[SEP] { identifier[View] identifier[view] operator[=] identifier[layoutManager] operator[SEP] identifier[getChildAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[int] identifier[position] operator[=] identifier[layoutManager] operator[SEP] identifier[getPosition] operator[SEP] identifier[view] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[position] operator[==] identifier[alignPos] operator[SEP] { identifier[viewAnchor] operator[=] identifier[position] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[==] identifier[childCount] operator[-] Other[1] operator[SEP] { identifier[alignLine] operator[=] identifier[orientationHelper] operator[SEP] identifier[getDecoratedEnd] operator[SEP] identifier[view] operator[SEP] operator[SEP] } Keyword[else] { identifier[View] identifier[child] operator[=] identifier[layoutManager] operator[SEP] identifier[getChildAt] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[aPos] operator[=] identifier[layoutManager] operator[SEP] identifier[getPosition] operator[SEP] identifier[child] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[aPos] operator[==] identifier[position] operator[-] Other[1] operator[SEP] { identifier[alignLine] operator[=] identifier[orientationHelper] operator[SEP] identifier[getDecoratedStart] operator[SEP] identifier[child] operator[SEP] operator[-] identifier[layoutManager] operator[SEP] identifier[obtainExtraMargin] operator[SEP] identifier[child] , literal[boolean] operator[SEP] operator[+] identifier[layoutManager] operator[SEP] identifier[obtainExtraMargin] operator[SEP] identifier[view] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { identifier[alignLine] operator[=] identifier[orientationHelper] operator[SEP] identifier[getDecoratedEnd] operator[SEP] identifier[view] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] } } } Keyword[else] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[childCount] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[View] identifier[view] operator[=] identifier[layoutManager] operator[SEP] identifier[getChildAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[int] identifier[position] operator[=] identifier[layoutManager] operator[SEP] identifier[getPosition] operator[SEP] identifier[view] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[position] operator[==] identifier[alignPos] operator[SEP] { identifier[viewAnchor] operator[=] identifier[position] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[==] Other[0] operator[SEP] { identifier[alignLine] operator[=] identifier[orientationHelper] operator[SEP] identifier[getDecoratedStart] operator[SEP] identifier[view] operator[SEP] operator[SEP] } Keyword[else] { identifier[View] identifier[child] operator[=] identifier[layoutManager] operator[SEP] identifier[getChildAt] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] identifier[alignLine] operator[=] identifier[orientationHelper] operator[SEP] identifier[getDecoratedEnd] operator[SEP] identifier[child] operator[SEP] operator[+] identifier[layoutManager] operator[SEP] identifier[obtainExtraMargin] operator[SEP] identifier[child] , literal[boolean] , literal[boolean] operator[SEP] operator[-] identifier[layoutManager] operator[SEP] identifier[obtainExtraMargin] operator[SEP] identifier[view] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] Keyword[int] identifier[viewStart] operator[=] identifier[orientationHelper] operator[SEP] identifier[getDecoratedStart] operator[SEP] identifier[view] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[alignLine] operator[==] identifier[viewStart] operator[SEP] { identifier[viewAnchor] operator[=] identifier[Integer] operator[SEP] identifier[MIN_VALUE] operator[SEP] } Keyword[else] { Keyword[int] identifier[nextPosition] operator[=] identifier[layoutManager] operator[SEP] identifier[getPosition] operator[SEP] identifier[child] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nextPosition] operator[!=] identifier[alignPos] operator[-] Other[1] operator[SEP] { identifier[LayoutHelper] identifier[layoutHelper] operator[=] identifier[layoutManager] operator[SEP] identifier[findLayoutHelperByPosition] operator[SEP] identifier[alignPos] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[layoutHelper] operator[!=] Other[null] operator[&&] identifier[layoutHelper] Keyword[instanceof] identifier[StickyLayoutHelper] operator[SEP] { Keyword[if] operator[SEP] identifier[layoutHelper] operator[SEP] identifier[getFixedView] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[alignLine] operator[+=] identifier[layoutHelper] operator[SEP] identifier[getFixedView] operator[SEP] operator[SEP] operator[SEP] identifier[getMeasuredHeight] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[else] { identifier[LayoutHelper] identifier[layoutHelper] operator[=] identifier[layoutManager] operator[SEP] identifier[findLayoutHelperByPosition] operator[SEP] identifier[nextPosition] operator[SEP] operator[SEP] identifier[layoutHelper] operator[SEP] identifier[getRange] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[break] operator[SEP] } } } Keyword[if] operator[SEP] identifier[viewAnchor] operator[==] identifier[Integer] operator[SEP] identifier[MIN_VALUE] operator[SEP] { Keyword[return] operator[SEP] } identifier[View] identifier[gapView] operator[=] identifier[hasGapsToFix] operator[SEP] identifier[layoutManager] , identifier[viewAnchor] , identifier[alignLine] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[gapView] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[size] operator[=] identifier[mSpans] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[<] identifier[size] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Span] identifier[span] operator[=] identifier[mSpans] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[span] operator[SEP] identifier[setLine] operator[SEP] identifier[alignLine] operator[SEP] operator[SEP] } identifier[layoutManager] operator[SEP] identifier[requestSimpleAnimationsInNextLayout] operator[SEP] operator[SEP] operator[SEP] identifier[layoutManager] operator[SEP] identifier[requestLayout] operator[SEP] operator[SEP] operator[SEP] } }
public OvhSharedAccount organizationName_service_exchangeService_sharedAccount_sharedEmailAddress_GET(String organizationName, String exchangeService, String sharedEmailAddress) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/sharedAccount/{sharedEmailAddress}"; StringBuilder sb = path(qPath, organizationName, exchangeService, sharedEmailAddress); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhSharedAccount.class); }
class class_name[name] begin[{] method[organizationName_service_exchangeService_sharedAccount_sharedEmailAddress_GET, return_type[type[OvhSharedAccount]], modifier[public], parameter[organizationName, exchangeService, sharedEmailAddress]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[String], resp] return[call[.convertTo, parameter[member[.resp], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OvhSharedAccount, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[OvhSharedAccount] identifier[organizationName_service_exchangeService_sharedAccount_sharedEmailAddress_GET] operator[SEP] identifier[String] identifier[organizationName] , identifier[String] identifier[exchangeService] , identifier[String] identifier[sharedEmailAddress] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[organizationName] , identifier[exchangeService] , identifier[sharedEmailAddress] operator[SEP] operator[SEP] identifier[String] identifier[resp] operator[=] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[convertTo] operator[SEP] identifier[resp] , identifier[OvhSharedAccount] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public static Map<String, Object> toMap(Object inputParameter, PropertyDescriptor[] propertyDescriptors) { Map<String, Object> resultMap = new HashMap<String, Object>(); Object propertyValue = null; for (PropertyDescriptor property : propertyDescriptors) { propertyValue = callGetter(inputParameter, property); if ("class".equals(property.getName()) == false) { resultMap.put(property.getName(), propertyValue); } } return resultMap; }
class class_name[name] begin[{] method[toMap, return_type[type[Map]], modifier[public static], parameter[inputParameter, propertyDescriptors]] begin[{] local_variable[type[Map], resultMap] local_variable[type[Object], propertyValue] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=propertyValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=inputParameter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=callGetter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="class"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), MemberReference(member=propertyValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=resultMap, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=propertyDescriptors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=property)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PropertyDescriptor, sub_type=None))), label=None) return[member[.resultMap]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[toMap] operator[SEP] identifier[Object] identifier[inputParameter] , identifier[PropertyDescriptor] operator[SEP] operator[SEP] identifier[propertyDescriptors] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[resultMap] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[propertyValue] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[PropertyDescriptor] identifier[property] operator[:] identifier[propertyDescriptors] operator[SEP] { identifier[propertyValue] operator[=] identifier[callGetter] operator[SEP] identifier[inputParameter] , identifier[property] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[property] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[==] literal[boolean] operator[SEP] { identifier[resultMap] operator[SEP] identifier[put] operator[SEP] identifier[property] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[propertyValue] operator[SEP] operator[SEP] } } Keyword[return] identifier[resultMap] operator[SEP] }
public void marshall(ArchiveGroupSettings archiveGroupSettings, ProtocolMarshaller protocolMarshaller) { if (archiveGroupSettings == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(archiveGroupSettings.getDestination(), DESTINATION_BINDING); protocolMarshaller.marshall(archiveGroupSettings.getRolloverInterval(), ROLLOVERINTERVAL_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[archiveGroupSettings, protocolMarshaller]] begin[{] if[binary_operation[member[.archiveGroupSettings], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDestination, postfix_operators=[], prefix_operators=[], qualifier=archiveGroupSettings, selectors=[], type_arguments=None), MemberReference(member=DESTINATION_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRolloverInterval, postfix_operators=[], prefix_operators=[], qualifier=archiveGroupSettings, selectors=[], type_arguments=None), MemberReference(member=ROLLOVERINTERVAL_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ArchiveGroupSettings] identifier[archiveGroupSettings] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[archiveGroupSettings] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[archiveGroupSettings] operator[SEP] identifier[getDestination] operator[SEP] operator[SEP] , identifier[DESTINATION_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[archiveGroupSettings] operator[SEP] identifier[getRolloverInterval] operator[SEP] operator[SEP] , identifier[ROLLOVERINTERVAL_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public static void fixOverriddenExports( Instance instance ) { if( ! instance.overriddenExports.isEmpty()) { Map<String,String> componentExports = ComponentHelpers.findAllExportedVariables( instance.getComponent()); Iterator<Map.Entry<String,String>> iter = instance.overriddenExports.entrySet().iterator(); while( iter.hasNext()) { // Does export exist in component... with the same value as in overridden exports? // If so, remove from overridden exports (because it is not overridden at all !) Map.Entry<String,String> entry = iter.next(); String value = componentExports.get( entry.getKey()); if( Objects.equals( value, entry.getValue())) iter.remove(); } } }
class class_name[name] begin[{] method[fixOverriddenExports, return_type[void], modifier[public static], parameter[instance]] begin[{] if[call[instance.overriddenExports.isEmpty, parameter[]]] begin[{] local_variable[type[Map], componentExports] local_variable[type[Iterator], iter] while[call[iter.hasNext, parameter[]]] begin[{] local_variable[type[Map], entry] local_variable[type[String], value] if[call[Objects.equals, parameter[member[.value], call[entry.getValue, parameter[]]]]] begin[{] call[iter.remove, parameter[]] else begin[{] None end[}] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[fixOverriddenExports] operator[SEP] identifier[Instance] identifier[instance] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[instance] operator[SEP] identifier[overriddenExports] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[componentExports] operator[=] identifier[ComponentHelpers] operator[SEP] identifier[findAllExportedVariables] operator[SEP] identifier[instance] operator[SEP] identifier[getComponent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[String] operator[>] operator[>] identifier[iter] operator[=] identifier[instance] operator[SEP] identifier[overriddenExports] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[iter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[String] operator[>] identifier[entry] operator[=] identifier[iter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[value] operator[=] identifier[componentExports] operator[SEP] identifier[get] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[value] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[iter] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } } }
private void populateDestinationPermissions() { SibTr.entry(tc, CLASS_NAME + "populateDestinationPermissions", properties); pids.clear(); String[] roles = (String[]) properties .get(MessagingSecurityConstants.ROLE); initializeMaps(); if (roles != null) { checkIfRolesAreUnique(roles); for (String role : roles) { Dictionary<String, Object> roleProperties = getDictionaryObject(role); Set<String> users = null; Set<String> groups = null; // Get the list of Users users = createUserOrGroupSet(roleProperties, MessagingSecurityConstants.USER); // Get the list of Groups groups = createUserOrGroupSet(roleProperties, MessagingSecurityConstants.GROUP); if (roleProperties != null) { populateQueuePermissions(roleProperties, users, groups); populateTemporarayDestinationPermissions(roleProperties, users, groups); populateTopicPermissions(roleProperties, users, groups); } } } if (tc.isDebugEnabled()) { SibTr.debug(tc, CLASS_NAME + " ***** Queue Permissions *****"); printDestinationPermissions(queuePermissions); SibTr.debug(tc, CLASS_NAME + " ***** Topic Permissions *****"); printDestinationPermissions(topicPermissions); SibTr.debug(tc, CLASS_NAME + " ***** Temporary DestinationPermissions *****"); printDestinationPermissions(temporaryDestinationPermissions); } SibTr.exit(tc, CLASS_NAME + "populateDestinationPermissions"); }
class class_name[name] begin[{] method[populateDestinationPermissions, return_type[void], modifier[private], parameter[]] begin[{] call[SibTr.entry, parameter[member[.tc], binary_operation[member[.CLASS_NAME], +, literal["populateDestinationPermissions"]], member[.properties]]] call[pids.clear, parameter[]] local_variable[type[String], roles] call[.initializeMaps, parameter[]] if[binary_operation[member[.roles], !=, literal[null]]] begin[{] call[.checkIfRolesAreUnique, parameter[member[.roles]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=role, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDictionaryObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=roleProperties)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Dictionary, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=users)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Set, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=groups)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Set, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=users, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=roleProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=USER, postfix_operators=[], prefix_operators=[], qualifier=MessagingSecurityConstants, selectors=[])], member=createUserOrGroupSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=groups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=roleProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=GROUP, postfix_operators=[], prefix_operators=[], qualifier=MessagingSecurityConstants, selectors=[])], member=createUserOrGroupSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=roleProperties, 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=roleProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=users, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=groups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=populateQueuePermissions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=roleProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=users, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=groups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=populateTemporarayDestinationPermissions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=roleProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=users, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=groups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=populateTopicPermissions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=roles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=role)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[SibTr.debug, parameter[member[.tc], binary_operation[member[.CLASS_NAME], +, literal[" ***** Queue Permissions *****"]]]] call[.printDestinationPermissions, parameter[member[.queuePermissions]]] call[SibTr.debug, parameter[member[.tc], binary_operation[member[.CLASS_NAME], +, literal[" ***** Topic Permissions *****"]]]] call[.printDestinationPermissions, parameter[member[.topicPermissions]]] call[SibTr.debug, parameter[member[.tc], binary_operation[member[.CLASS_NAME], +, literal[" ***** Temporary DestinationPermissions *****"]]]] call[.printDestinationPermissions, parameter[member[.temporaryDestinationPermissions]]] else begin[{] None end[}] call[SibTr.exit, parameter[member[.tc], binary_operation[member[.CLASS_NAME], +, literal["populateDestinationPermissions"]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[populateDestinationPermissions] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , identifier[CLASS_NAME] operator[+] literal[String] , identifier[properties] operator[SEP] operator[SEP] identifier[pids] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[roles] operator[=] operator[SEP] identifier[String] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[get] operator[SEP] identifier[MessagingSecurityConstants] operator[SEP] identifier[ROLE] operator[SEP] operator[SEP] identifier[initializeMaps] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[roles] operator[!=] Other[null] operator[SEP] { identifier[checkIfRolesAreUnique] operator[SEP] identifier[roles] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[role] operator[:] identifier[roles] operator[SEP] { identifier[Dictionary] operator[<] identifier[String] , identifier[Object] operator[>] identifier[roleProperties] operator[=] identifier[getDictionaryObject] operator[SEP] identifier[role] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[users] operator[=] Other[null] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[groups] operator[=] Other[null] operator[SEP] identifier[users] operator[=] identifier[createUserOrGroupSet] operator[SEP] identifier[roleProperties] , identifier[MessagingSecurityConstants] operator[SEP] identifier[USER] operator[SEP] operator[SEP] identifier[groups] operator[=] identifier[createUserOrGroupSet] operator[SEP] identifier[roleProperties] , identifier[MessagingSecurityConstants] operator[SEP] identifier[GROUP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[roleProperties] operator[!=] Other[null] operator[SEP] { identifier[populateQueuePermissions] operator[SEP] identifier[roleProperties] , identifier[users] , identifier[groups] operator[SEP] operator[SEP] identifier[populateTemporarayDestinationPermissions] operator[SEP] identifier[roleProperties] , identifier[users] , identifier[groups] operator[SEP] operator[SEP] identifier[populateTopicPermissions] operator[SEP] identifier[roleProperties] , identifier[users] , identifier[groups] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[CLASS_NAME] operator[+] literal[String] operator[SEP] operator[SEP] identifier[printDestinationPermissions] operator[SEP] identifier[queuePermissions] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[CLASS_NAME] operator[+] literal[String] operator[SEP] operator[SEP] identifier[printDestinationPermissions] operator[SEP] identifier[topicPermissions] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[CLASS_NAME] operator[+] literal[String] operator[SEP] operator[SEP] identifier[printDestinationPermissions] operator[SEP] identifier[temporaryDestinationPermissions] operator[SEP] operator[SEP] } identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , identifier[CLASS_NAME] operator[+] literal[String] operator[SEP] operator[SEP] }
public FessMessages addSuccessReindexStarted(String property) { assertPropertyNotNull(property); add(property, new UserMessage(SUCCESS_reindex_started)); return this; }
class class_name[name] begin[{] method[addSuccessReindexStarted, return_type[type[FessMessages]], modifier[public], parameter[property]] begin[{] call[.assertPropertyNotNull, parameter[member[.property]]] call[.add, parameter[member[.property], ClassCreator(arguments=[MemberReference(member=SUCCESS_reindex_started, 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=UserMessage, sub_type=None))]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[FessMessages] identifier[addSuccessReindexStarted] operator[SEP] identifier[String] identifier[property] operator[SEP] { identifier[assertPropertyNotNull] operator[SEP] identifier[property] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[property] , Keyword[new] identifier[UserMessage] operator[SEP] identifier[SUCCESS_reindex_started] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
private void obtainFloatingPointSeparator(@NonNull final TypedArray typedArray) { setFloatingPointSeparator( typedArray.getText(R.styleable.SeekBarPreference_floatingPointSeparator)); }
class class_name[name] begin[{] method[obtainFloatingPointSeparator, return_type[void], modifier[private], parameter[typedArray]] begin[{] call[.setFloatingPointSeparator, parameter[call[typedArray.getText, parameter[member[R.styleable.SeekBarPreference_floatingPointSeparator]]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[obtainFloatingPointSeparator] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[TypedArray] identifier[typedArray] operator[SEP] { identifier[setFloatingPointSeparator] operator[SEP] identifier[typedArray] operator[SEP] identifier[getText] operator[SEP] identifier[R] operator[SEP] identifier[styleable] operator[SEP] identifier[SeekBarPreference_floatingPointSeparator] operator[SEP] operator[SEP] operator[SEP] }
public static<T> DetachedStageRuntime<? extends T> create( StageBean bean, Stage.Info info, Stage.Context context, Class<T> klass ) { switch (bean.getDefinition().getType()) { case PROCESSOR: return new DetachedStageRuntime.DetachedProcessor(bean, info, context); case TARGET: case EXECUTOR: return new DetachedStageRuntime.DetachedTarget(bean, info, context); default: throw new RuntimeException("Unsupported stage type: " + bean.getDefinition().getType()); } }
class class_name[name] begin[{] method[create, return_type[type[DetachedStageRuntime]], modifier[public static], parameter[bean, info, context, klass]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['PROCESSOR'], statements=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=bean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=info, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=context, 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=DetachedStageRuntime, sub_type=ReferenceType(arguments=None, dimensions=None, name=DetachedProcessor, sub_type=None))), label=None)]), SwitchStatementCase(case=['TARGET', 'EXECUTOR'], statements=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=bean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=info, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=context, 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=DetachedStageRuntime, sub_type=ReferenceType(arguments=None, dimensions=None, name=DetachedTarget, sub_type=None))), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported stage type: "), operandr=MethodInvocation(arguments=[], member=getDefinition, postfix_operators=[], prefix_operators=[], qualifier=bean, selectors=[MethodInvocation(arguments=[], member=getType, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], 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)])], expression=MethodInvocation(arguments=[], member=getDefinition, postfix_operators=[], prefix_operators=[], qualifier=bean, selectors=[MethodInvocation(arguments=[], member=getType, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None) end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[DetachedStageRuntime] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[create] operator[SEP] identifier[StageBean] identifier[bean] , identifier[Stage] operator[SEP] identifier[Info] identifier[info] , identifier[Stage] operator[SEP] identifier[Context] identifier[context] , identifier[Class] operator[<] identifier[T] operator[>] identifier[klass] operator[SEP] { Keyword[switch] operator[SEP] identifier[bean] operator[SEP] identifier[getDefinition] operator[SEP] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[PROCESSOR] operator[:] Keyword[return] Keyword[new] identifier[DetachedStageRuntime] operator[SEP] identifier[DetachedProcessor] operator[SEP] identifier[bean] , identifier[info] , identifier[context] operator[SEP] operator[SEP] Keyword[case] identifier[TARGET] operator[:] Keyword[case] identifier[EXECUTOR] operator[:] Keyword[return] Keyword[new] identifier[DetachedStageRuntime] operator[SEP] identifier[DetachedTarget] operator[SEP] identifier[bean] , identifier[info] , identifier[context] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[bean] operator[SEP] identifier[getDefinition] operator[SEP] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
synchronized final JsMsgPart getApiIfFluffed() { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { if (api == null) SibTr.debug(this, tc, "getApiIfFluffed returning null"); } return api; }
class class_name[name] begin[{] method[getApiIfFluffed, return_type[type[JsMsgPart]], modifier[synchronized final], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] if[binary_operation[member[.api], ==, literal[null]]] begin[{] call[SibTr.debug, parameter[THIS[], member[.tc], literal["getApiIfFluffed returning null"]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.api]] end[}] END[}]
Keyword[synchronized] Keyword[final] identifier[JsMsgPart] identifier[getApiIfFluffed] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[api] operator[==] Other[null] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[api] operator[SEP] }
public static <T> List<T> getAt(ListWithDefault<T> self, EmptyRange range) { return ListWithDefault.newInstance(new ArrayList<T>(), self.isLazyDefaultValues(), self.getInitClosure()); }
class class_name[name] begin[{] method[getAt, return_type[type[List]], modifier[public static], parameter[self, range]] begin[{] return[call[ListWithDefault.newInstance, parameter[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=T, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), call[self.isLazyDefaultValues, parameter[]], call[self.getInitClosure, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[getAt] operator[SEP] identifier[ListWithDefault] operator[<] identifier[T] operator[>] identifier[self] , identifier[EmptyRange] identifier[range] operator[SEP] { Keyword[return] identifier[ListWithDefault] operator[SEP] identifier[newInstance] operator[SEP] Keyword[new] identifier[ArrayList] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] , identifier[self] operator[SEP] identifier[isLazyDefaultValues] operator[SEP] operator[SEP] , identifier[self] operator[SEP] identifier[getInitClosure] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void add(String [] strValues) { if (strValues == null) return; if (values == null) values = new LinkedList(); for (int i=0;i<strValues.length;i++) { values.add( new Value(strValues[i]) ); } }
class class_name[name] begin[{] method[add, return_type[void], modifier[public], parameter[strValues]] begin[{] if[binary_operation[member[.strValues], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] if[binary_operation[member[.values], ==, literal[null]]] begin[{] assign[member[.values], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LinkedList, sub_type=None))] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=strValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=Value, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=values, 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=strValues, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[strValues] operator[SEP] { Keyword[if] operator[SEP] identifier[strValues] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[values] operator[==] Other[null] operator[SEP] identifier[values] operator[=] Keyword[new] identifier[LinkedList] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[strValues] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[values] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Value] operator[SEP] identifier[strValues] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public double getTripDistance (String trip_id, boolean straightLine) { return straightLine ? GeoUtils.getDistance(this.getStraightLineForStops(trip_id)) : GeoUtils.getDistance(this.getTripGeometry(trip_id)); }
class class_name[name] begin[{] method[getTripDistance, return_type[type[double]], modifier[public], parameter[trip_id, straightLine]] begin[{] return[TernaryExpression(condition=MemberReference(member=straightLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=trip_id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTripGeometry, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=getDistance, postfix_operators=[], prefix_operators=[], qualifier=GeoUtils, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=trip_id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getStraightLineForStops, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=getDistance, postfix_operators=[], prefix_operators=[], qualifier=GeoUtils, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] Keyword[double] identifier[getTripDistance] operator[SEP] identifier[String] identifier[trip_id] , Keyword[boolean] identifier[straightLine] operator[SEP] { Keyword[return] identifier[straightLine] operator[?] identifier[GeoUtils] operator[SEP] identifier[getDistance] operator[SEP] Keyword[this] operator[SEP] identifier[getStraightLineForStops] operator[SEP] identifier[trip_id] operator[SEP] operator[SEP] operator[:] identifier[GeoUtils] operator[SEP] identifier[getDistance] operator[SEP] Keyword[this] operator[SEP] identifier[getTripGeometry] operator[SEP] identifier[trip_id] operator[SEP] operator[SEP] operator[SEP] }
public static String getMapFieldAdderName(Field field) { if (field.isMap()) { return PUT_PREFIX + Formatter.toPascalCase(field.getName()); } throw new IllegalArgumentException(field.toString()); }
class class_name[name] begin[{] method[getMapFieldAdderName, return_type[type[String]], modifier[public static], parameter[field]] begin[{] if[call[field.isMap, parameter[]]] begin[{] return[binary_operation[member[.PUT_PREFIX], +, call[Formatter.toPascalCase, parameter[call[field.getName, parameter[]]]]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None)], 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[}]
Keyword[public] Keyword[static] identifier[String] identifier[getMapFieldAdderName] operator[SEP] identifier[Field] identifier[field] operator[SEP] { Keyword[if] operator[SEP] identifier[field] operator[SEP] identifier[isMap] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[PUT_PREFIX] operator[+] identifier[Formatter] operator[SEP] identifier[toPascalCase] operator[SEP] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[field] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public <T> MutateInBuilder arrayAddUnique(String path, T value) { asyncBuilder.arrayAddUnique(path, value); return this; }
class class_name[name] begin[{] method[arrayAddUnique, return_type[type[MutateInBuilder]], modifier[public], parameter[path, value]] begin[{] call[asyncBuilder.arrayAddUnique, parameter[member[.path], member[.value]]] return[THIS[]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[MutateInBuilder] identifier[arrayAddUnique] operator[SEP] identifier[String] identifier[path] , identifier[T] identifier[value] operator[SEP] { identifier[asyncBuilder] operator[SEP] identifier[arrayAddUnique] operator[SEP] identifier[path] , identifier[value] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public Boolean visit(final CompilationUnit n, final Object arg) { final Boolean result = super.visit(n, arg); return result != null && result; }
class class_name[name] begin[{] method[visit, return_type[type[Boolean]], modifier[public], parameter[n, arg]] begin[{] local_variable[type[Boolean], result] return[binary_operation[binary_operation[member[.result], !=, literal[null]], &&, member[.result]]] end[}] END[}]
Keyword[public] identifier[Boolean] identifier[visit] operator[SEP] Keyword[final] identifier[CompilationUnit] identifier[n] , Keyword[final] identifier[Object] identifier[arg] operator[SEP] { Keyword[final] identifier[Boolean] identifier[result] operator[=] Keyword[super] operator[SEP] identifier[visit] operator[SEP] identifier[n] , identifier[arg] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[!=] Other[null] operator[&&] identifier[result] operator[SEP] }
public static InvocationHandlerAdapter toField(String name, FieldLocator.Factory fieldLocatorFactory) { return new ForField(name, CACHED, UNPRIVILEGED, Assigner.DEFAULT, fieldLocatorFactory); }
class class_name[name] begin[{] method[toField, return_type[type[InvocationHandlerAdapter]], modifier[public static], parameter[name, fieldLocatorFactory]] begin[{] return[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CACHED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=UNPRIVILEGED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=DEFAULT, postfix_operators=[], prefix_operators=[], qualifier=Assigner, selectors=[]), MemberReference(member=fieldLocatorFactory, 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=ForField, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[InvocationHandlerAdapter] identifier[toField] operator[SEP] identifier[String] identifier[name] , identifier[FieldLocator] operator[SEP] identifier[Factory] identifier[fieldLocatorFactory] operator[SEP] { Keyword[return] Keyword[new] identifier[ForField] operator[SEP] identifier[name] , identifier[CACHED] , identifier[UNPRIVILEGED] , identifier[Assigner] operator[SEP] identifier[DEFAULT] , identifier[fieldLocatorFactory] operator[SEP] operator[SEP] }
public void marshall(DeletePolicyRequest deletePolicyRequest, ProtocolMarshaller protocolMarshaller) { if (deletePolicyRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deletePolicyRequest.getPolicyName(), POLICYNAME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[deletePolicyRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.deletePolicyRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getPolicyName, postfix_operators=[], prefix_operators=[], qualifier=deletePolicyRequest, selectors=[], type_arguments=None), MemberReference(member=POLICYNAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DeletePolicyRequest] identifier[deletePolicyRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[deletePolicyRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[deletePolicyRequest] operator[SEP] identifier[getPolicyName] operator[SEP] operator[SEP] , identifier[POLICYNAME_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public void clear () { _popups.clear(); if (_showingPopup.get() != null) { _showingPopup.get().hide(true); _showingPopup.update(null); } }
class class_name[name] begin[{] method[clear, return_type[void], modifier[public], parameter[]] begin[{] call[_popups.clear, parameter[]] if[binary_operation[call[_showingPopup.get, parameter[]], !=, literal[null]]] begin[{] call[_showingPopup.get, parameter[]] call[_showingPopup.update, parameter[literal[null]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[clear] operator[SEP] operator[SEP] { identifier[_popups] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_showingPopup] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[_showingPopup] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[hide] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[_showingPopup] operator[SEP] identifier[update] operator[SEP] Other[null] operator[SEP] operator[SEP] } }
public boolean addCSV(String name, String... values) { QuotedCSV existing = null; for (HttpField f : this) { if (f.getName().equalsIgnoreCase(name)) { if (existing == null) existing = new QuotedCSV(false); existing.addValue(f.getValue()); } } String value = addCSV(existing, values); if (value != null) { add(name, value); return true; } return false; }
class class_name[name] begin[{] method[addCSV, return_type[type[boolean]], modifier[public], parameter[name, values]] begin[{] local_variable[type[QuotedCSV], existing] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equalsIgnoreCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=existing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=existing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=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=[], type=ReferenceType(arguments=None, dimensions=None, name=QuotedCSV, sub_type=None))), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None)], member=addValue, postfix_operators=[], prefix_operators=[], qualifier=existing, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HttpField, sub_type=None))), label=None) local_variable[type[String], value] if[binary_operation[member[.value], !=, literal[null]]] begin[{] call[.add, parameter[member[.name], member[.value]]] return[literal[true]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[addCSV] operator[SEP] identifier[String] identifier[name] , identifier[String] operator[...] identifier[values] operator[SEP] { identifier[QuotedCSV] identifier[existing] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[HttpField] identifier[f] operator[:] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] identifier[f] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[existing] operator[==] Other[null] operator[SEP] identifier[existing] operator[=] Keyword[new] identifier[QuotedCSV] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[existing] operator[SEP] identifier[addValue] operator[SEP] identifier[f] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[String] identifier[value] operator[=] identifier[addCSV] operator[SEP] identifier[existing] , identifier[values] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { identifier[add] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public com.google.api.ads.admanager.axis.v201811.DeliveryRateType getDeliveryRateType() { return deliveryRateType; }
class class_name[name] begin[{] method[getDeliveryRateType, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.deliveryRateType]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201811] operator[SEP] identifier[DeliveryRateType] identifier[getDeliveryRateType] operator[SEP] operator[SEP] { Keyword[return] identifier[deliveryRateType] operator[SEP] }
public void readToExistingBean(EndianAwareDataInputStream is, ThirdPartyParseable target) throws IllegalAccessException, UnrecognizedFormatException{ //target = (CLASS)Beans.instantiate(null, clazz.getName()); ensureContextInstantiatedForReading(is,target); target.describeFormat(this); popBean(); }
class class_name[name] begin[{] method[readToExistingBean, return_type[void], modifier[public], parameter[is, target]] begin[{] call[.ensureContextInstantiatedForReading, parameter[member[.is], member[.target]]] call[target.describeFormat, parameter[THIS[]]] call[.popBean, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[readToExistingBean] operator[SEP] identifier[EndianAwareDataInputStream] identifier[is] , identifier[ThirdPartyParseable] identifier[target] operator[SEP] Keyword[throws] identifier[IllegalAccessException] , identifier[UnrecognizedFormatException] { identifier[ensureContextInstantiatedForReading] operator[SEP] identifier[is] , identifier[target] operator[SEP] operator[SEP] identifier[target] operator[SEP] identifier[describeFormat] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[popBean] operator[SEP] operator[SEP] operator[SEP] }
public static Object[] growArray(Object[] rgobjEnable, int iNewSize, int iBufferSize) { if (iNewSize > rgobjEnable.length) { Object[] rgobjNew = new Object[iNewSize + iBufferSize]; for (int i = 0; i < rgobjEnable.length; i++) rgobjNew[i] = rgobjEnable[i]; for (int i = rgobjEnable.length; i < rgobjNew.length ;i++) rgobjNew[i] = null; rgobjEnable = rgobjNew; } return rgobjEnable; }
class class_name[name] begin[{] method[growArray, return_type[type[Object]], modifier[public static], parameter[rgobjEnable, iNewSize, iBufferSize]] begin[{] if[binary_operation[member[.iNewSize], >, member[rgobjEnable.length]]] begin[{] local_variable[type[Object], rgobjNew] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=rgobjNew, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=rgobjEnable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=rgobjEnable, 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) ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=rgobjNew, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), 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=rgobjNew, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=rgobjEnable, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.rgobjEnable], member[.rgobjNew]] else begin[{] None end[}] return[member[.rgobjEnable]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] operator[SEP] operator[SEP] identifier[growArray] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[rgobjEnable] , Keyword[int] identifier[iNewSize] , Keyword[int] identifier[iBufferSize] operator[SEP] { Keyword[if] operator[SEP] identifier[iNewSize] operator[>] identifier[rgobjEnable] operator[SEP] identifier[length] operator[SEP] { identifier[Object] operator[SEP] operator[SEP] identifier[rgobjNew] operator[=] Keyword[new] identifier[Object] operator[SEP] identifier[iNewSize] operator[+] identifier[iBufferSize] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[rgobjEnable] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[rgobjNew] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[rgobjEnable] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[rgobjEnable] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[<] identifier[rgobjNew] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[rgobjNew] operator[SEP] identifier[i] operator[SEP] operator[=] Other[null] operator[SEP] identifier[rgobjEnable] operator[=] identifier[rgobjNew] operator[SEP] } Keyword[return] identifier[rgobjEnable] operator[SEP] }
protected void handleRequestValue(final Date value, final boolean valid, final String text) { // As setData() clears the text value (if valid), this must be called first so it can be set after setData(value); DateFieldModel model = getOrCreateComponentModel(); model.validDate = valid; model.text = text; }
class class_name[name] begin[{] method[handleRequestValue, return_type[void], modifier[protected], parameter[value, valid, text]] begin[{] call[.setData, parameter[member[.value]]] local_variable[type[DateFieldModel], model] assign[member[model.validDate], member[.valid]] assign[member[model.text], member[.text]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[handleRequestValue] operator[SEP] Keyword[final] identifier[Date] identifier[value] , Keyword[final] Keyword[boolean] identifier[valid] , Keyword[final] identifier[String] identifier[text] operator[SEP] { identifier[setData] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[DateFieldModel] identifier[model] operator[=] identifier[getOrCreateComponentModel] operator[SEP] operator[SEP] operator[SEP] identifier[model] operator[SEP] identifier[validDate] operator[=] identifier[valid] operator[SEP] identifier[model] operator[SEP] identifier[text] operator[=] identifier[text] operator[SEP] }
private List<CmsGroup> getVirtualGroupsForRole(CmsDbContext dbc, CmsRole role) throws CmsException { Set<Integer> roleFlags = new HashSet<Integer>(); // add role flag Integer flags = new Integer(role.getVirtualGroupFlags()); roleFlags.add(flags); // collect all child role flags Iterator<CmsRole> itChildRoles = role.getChildren(true).iterator(); while (itChildRoles.hasNext()) { CmsRole child = itChildRoles.next(); flags = new Integer(child.getVirtualGroupFlags()); roleFlags.add(flags); } // iterate all groups matching the flags List<CmsGroup> groups = new ArrayList<CmsGroup>(); Iterator<CmsGroup> it = getGroups(dbc, readOrganizationalUnit(dbc, role.getOuFqn()), false, false).iterator(); while (it.hasNext()) { CmsGroup group = it.next(); if (group.isVirtual()) { CmsRole r = CmsRole.valueOf(group); if (roleFlags.contains(new Integer(r.getVirtualGroupFlags()))) { groups.add(group); } } } return groups; }
class class_name[name] begin[{] method[getVirtualGroupsForRole, return_type[type[List]], modifier[private], parameter[dbc, role]] begin[{] local_variable[type[Set], roleFlags] local_variable[type[Integer], flags] call[roleFlags.add, parameter[member[.flags]]] local_variable[type[Iterator], itChildRoles] while[call[itChildRoles.hasNext, parameter[]]] begin[{] local_variable[type[CmsRole], child] assign[member[.flags], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getVirtualGroupFlags, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None))] call[roleFlags.add, parameter[member[.flags]]] end[}] local_variable[type[List], groups] local_variable[type[Iterator], it] while[call[it.hasNext, parameter[]]] begin[{] local_variable[type[CmsGroup], group] if[call[group.isVirtual, parameter[]]] begin[{] local_variable[type[CmsRole], r] if[call[roleFlags.contains, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getVirtualGroupFlags, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None))]]] begin[{] call[groups.add, parameter[member[.group]]] else begin[{] None end[}] else begin[{] None end[}] end[}] return[member[.groups]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[CmsGroup] operator[>] identifier[getVirtualGroupsForRole] operator[SEP] identifier[CmsDbContext] identifier[dbc] , identifier[CmsRole] identifier[role] operator[SEP] Keyword[throws] identifier[CmsException] { identifier[Set] operator[<] identifier[Integer] operator[>] identifier[roleFlags] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[Integer] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Integer] identifier[flags] operator[=] Keyword[new] identifier[Integer] operator[SEP] identifier[role] operator[SEP] identifier[getVirtualGroupFlags] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[roleFlags] operator[SEP] identifier[add] operator[SEP] identifier[flags] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[CmsRole] operator[>] identifier[itChildRoles] operator[=] identifier[role] operator[SEP] identifier[getChildren] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[itChildRoles] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsRole] identifier[child] operator[=] identifier[itChildRoles] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[flags] operator[=] Keyword[new] identifier[Integer] operator[SEP] identifier[child] operator[SEP] identifier[getVirtualGroupFlags] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[roleFlags] operator[SEP] identifier[add] operator[SEP] identifier[flags] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[CmsGroup] operator[>] identifier[groups] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[CmsGroup] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[CmsGroup] operator[>] identifier[it] operator[=] identifier[getGroups] operator[SEP] identifier[dbc] , identifier[readOrganizationalUnit] operator[SEP] identifier[dbc] , identifier[role] operator[SEP] identifier[getOuFqn] operator[SEP] operator[SEP] operator[SEP] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsGroup] identifier[group] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[group] operator[SEP] identifier[isVirtual] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsRole] identifier[r] operator[=] identifier[CmsRole] operator[SEP] identifier[valueOf] operator[SEP] identifier[group] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[roleFlags] operator[SEP] identifier[contains] operator[SEP] Keyword[new] identifier[Integer] operator[SEP] identifier[r] operator[SEP] identifier[getVirtualGroupFlags] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[groups] operator[SEP] identifier[add] operator[SEP] identifier[group] operator[SEP] operator[SEP] } } } Keyword[return] identifier[groups] operator[SEP] }
@Override public DeleteDhcpOptionsResult deleteDhcpOptions(DeleteDhcpOptionsRequest request) { request = beforeClientExecution(request); return executeDeleteDhcpOptions(request); }
class class_name[name] begin[{] method[deleteDhcpOptions, return_type[type[DeleteDhcpOptionsResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDeleteDhcpOptions, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DeleteDhcpOptionsResult] identifier[deleteDhcpOptions] operator[SEP] identifier[DeleteDhcpOptionsRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDeleteDhcpOptions] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public void put(String key, Double value) { if (this.compiledStatement != null) { if (value == null) { this.compiledStatement.bindNull(compiledStatementBindIndex++); } else { this.compiledStatement.bindDouble(compiledStatementBindIndex++, value); } } else if (values != null) { values.put(key, value); return; } names.add(key); // values.put(key, value); args.add(value); valueType.add(ParamType.DOUBLE); }
class class_name[name] begin[{] method[put, return_type[void], modifier[public], parameter[key, value]] begin[{] if[binary_operation[THIS[member[None.compiledStatement]], !=, literal[null]]] begin[{] if[binary_operation[member[.value], ==, literal[null]]] begin[{] THIS[member[None.compiledStatement]call[None.bindNull, parameter[member[.compiledStatementBindIndex]]]] else begin[{] THIS[member[None.compiledStatement]call[None.bindDouble, parameter[member[.compiledStatementBindIndex], member[.value]]]] end[}] else begin[{] if[binary_operation[member[.values], !=, literal[null]]] begin[{] call[values.put, parameter[member[.key], member[.value]]] return[None] else begin[{] None end[}] end[}] call[names.add, parameter[member[.key]]] call[args.add, parameter[member[.value]]] call[valueType.add, parameter[member[ParamType.DOUBLE]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[String] identifier[key] , identifier[Double] identifier[value] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[compiledStatement] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[compiledStatement] operator[SEP] identifier[bindNull] operator[SEP] identifier[compiledStatementBindIndex] operator[++] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[compiledStatement] operator[SEP] identifier[bindDouble] operator[SEP] identifier[compiledStatementBindIndex] operator[++] , identifier[value] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[values] operator[!=] Other[null] operator[SEP] { identifier[values] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[names] operator[SEP] identifier[add] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[args] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[valueType] operator[SEP] identifier[add] operator[SEP] identifier[ParamType] operator[SEP] identifier[DOUBLE] operator[SEP] operator[SEP] }
public void subscriber(String path, @Pin ServiceRefAmp serviceRef, Result<? super Cancel> result) { if (path.isEmpty()) { result.fail(new ServiceException(L.l("Invalid event location '{0}'", path))); return; } String address = address(path); EventNodeAsset node = lookupPubSubNode(address); Cancel cancel = node.subscribeImpl(serviceRef); result.ok(cancel); }
class class_name[name] begin[{] method[subscriber, return_type[void], modifier[public], parameter[path, serviceRef, result]] begin[{] if[call[path.isEmpty, parameter[]]] begin[{] call[result.fail, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid event location '{0}'"), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=l, postfix_operators=[], prefix_operators=[], qualifier=L, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServiceException, sub_type=None))]] return[None] else begin[{] None end[}] local_variable[type[String], address] local_variable[type[EventNodeAsset], node] local_variable[type[Cancel], cancel] call[result.ok, parameter[member[.cancel]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[subscriber] operator[SEP] identifier[String] identifier[path] , annotation[@] identifier[Pin] identifier[ServiceRefAmp] identifier[serviceRef] , identifier[Result] operator[<] operator[?] Keyword[super] identifier[Cancel] operator[>] identifier[result] operator[SEP] { Keyword[if] operator[SEP] identifier[path] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[SEP] identifier[fail] operator[SEP] Keyword[new] identifier[ServiceException] operator[SEP] identifier[L] operator[SEP] identifier[l] operator[SEP] literal[String] , identifier[path] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[String] identifier[address] operator[=] identifier[address] operator[SEP] identifier[path] operator[SEP] operator[SEP] identifier[EventNodeAsset] identifier[node] operator[=] identifier[lookupPubSubNode] operator[SEP] identifier[address] operator[SEP] operator[SEP] identifier[Cancel] identifier[cancel] operator[=] identifier[node] operator[SEP] identifier[subscribeImpl] operator[SEP] identifier[serviceRef] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[ok] operator[SEP] identifier[cancel] operator[SEP] operator[SEP] }
public GenericDraweeHierarchyBuilder setFailureImage( Drawable failureDrawable, @Nullable ScalingUtils.ScaleType failureImageScaleType) { mFailureImage = failureDrawable; mFailureImageScaleType = failureImageScaleType; return this; }
class class_name[name] begin[{] method[setFailureImage, return_type[type[GenericDraweeHierarchyBuilder]], modifier[public], parameter[failureDrawable, failureImageScaleType]] begin[{] assign[member[.mFailureImage], member[.failureDrawable]] assign[member[.mFailureImageScaleType], member[.failureImageScaleType]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[GenericDraweeHierarchyBuilder] identifier[setFailureImage] operator[SEP] identifier[Drawable] identifier[failureDrawable] , annotation[@] identifier[Nullable] identifier[ScalingUtils] operator[SEP] identifier[ScaleType] identifier[failureImageScaleType] operator[SEP] { identifier[mFailureImage] operator[=] identifier[failureDrawable] operator[SEP] identifier[mFailureImageScaleType] operator[=] identifier[failureImageScaleType] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
private List<String> resolveVariable(String filter, String text) { List<String> ret = new ArrayList<>(); Matcher m = PATTERN.matcher(text); while (m.find()) { ParsedStatement statement = ParsedStatement.fromMatcher(m); if (statement != null && statement.getVariable().startsWith(filter)) { ret.add(statement.getVariable()); } } return ret; }
class class_name[name] begin[{] method[resolveVariable, return_type[type[List]], modifier[private], parameter[filter, text]] begin[{] local_variable[type[List], ret] local_variable[type[Matcher], m] while[call[m.find, parameter[]]] begin[{] local_variable[type[ParsedStatement], statement] if[binary_operation[binary_operation[member[.statement], !=, literal[null]], &&, call[statement.getVariable, parameter[]]]] begin[{] call[ret.add, parameter[call[statement.getVariable, parameter[]]]] else begin[{] None end[}] end[}] return[member[.ret]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[String] operator[>] identifier[resolveVariable] operator[SEP] identifier[String] identifier[filter] , identifier[String] identifier[text] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[ret] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Matcher] identifier[m] operator[=] identifier[PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[text] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[m] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { identifier[ParsedStatement] identifier[statement] operator[=] identifier[ParsedStatement] operator[SEP] identifier[fromMatcher] operator[SEP] identifier[m] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[statement] operator[!=] Other[null] operator[&&] identifier[statement] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[filter] operator[SEP] operator[SEP] { identifier[ret] operator[SEP] identifier[add] operator[SEP] identifier[statement] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[ret] operator[SEP] }
public ICalendar first() throws IOException { StreamReader reader = constructReader(); if (index != null) { reader.setScribeIndex(index); } try { ICalendar ical = reader.readNext(); if (warnings != null) { warnings.add(reader.getWarnings()); } return ical; } finally { if (closeWhenDone()) { reader.close(); } } }
class class_name[name] begin[{] method[first, return_type[type[ICalendar]], modifier[public], parameter[]] begin[{] local_variable[type[StreamReader], reader] if[binary_operation[member[.index], !=, literal[null]]] begin[{] call[reader.setScribeIndex, parameter[member[.index]]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readNext, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), name=ical)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ICalendar, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=warnings, 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=[MethodInvocation(arguments=[], member=getWarnings, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=warnings, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=MemberReference(member=ical, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=None, finally_block=[IfStatement(condition=MethodInvocation(arguments=[], member=closeWhenDone, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) end[}] END[}]
Keyword[public] identifier[ICalendar] identifier[first] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[StreamReader] identifier[reader] operator[=] identifier[constructReader] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[!=] Other[null] operator[SEP] { identifier[reader] operator[SEP] identifier[setScribeIndex] operator[SEP] identifier[index] operator[SEP] operator[SEP] } Keyword[try] { identifier[ICalendar] identifier[ical] operator[=] identifier[reader] operator[SEP] identifier[readNext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[warnings] operator[!=] Other[null] operator[SEP] { identifier[warnings] operator[SEP] identifier[add] operator[SEP] identifier[reader] operator[SEP] identifier[getWarnings] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[ical] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[closeWhenDone] operator[SEP] operator[SEP] operator[SEP] { identifier[reader] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } }
public EClass getIfcLogical() { if (ifcLogicalEClass == null) { ifcLogicalEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(699); } return ifcLogicalEClass; }
class class_name[name] begin[{] method[getIfcLogical, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcLogicalEClass], ==, literal[null]]] begin[{] assign[member[.ifcLogicalEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package, 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=699)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.ifcLogicalEClass]] end[}] END[}]
Keyword[public] identifier[EClass] identifier[getIfcLogical] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcLogicalEClass] operator[==] Other[null] operator[SEP] { identifier[ifcLogicalEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[699] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcLogicalEClass] operator[SEP] }
@Override protected void checkForSessionIdListenerAndAdd(Object listener){ // Added for Servlet 3.1 support if (isHttpSessionIdListener(listener)) { // add to the HttpSessionIdListener list ((IHttpSessionContext31)this.sessionCtx).addHttpSessionIdListener((javax.servlet.http.HttpSessionIdListener) listener, name); this.sessionIdListeners.add(listener); } }
class class_name[name] begin[{] method[checkForSessionIdListenerAndAdd, return_type[void], modifier[protected], parameter[listener]] begin[{] if[call[.isHttpSessionIdListener, parameter[member[.listener]]]] begin[{] Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=sessionCtx, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type=ReferenceType(arguments=None, dimensions=[], name=IHttpSessionContext31, sub_type=None)) THIS[member[None.sessionIdListeners]call[None.add, parameter[member[.listener]]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[checkForSessionIdListenerAndAdd] operator[SEP] identifier[Object] identifier[listener] operator[SEP] { Keyword[if] operator[SEP] identifier[isHttpSessionIdListener] operator[SEP] identifier[listener] operator[SEP] operator[SEP] { operator[SEP] operator[SEP] identifier[IHttpSessionContext31] operator[SEP] Keyword[this] operator[SEP] identifier[sessionCtx] operator[SEP] operator[SEP] identifier[addHttpSessionIdListener] operator[SEP] operator[SEP] identifier[javax] operator[SEP] identifier[servlet] operator[SEP] identifier[http] operator[SEP] identifier[HttpSessionIdListener] operator[SEP] identifier[listener] , identifier[name] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[sessionIdListeners] operator[SEP] identifier[add] operator[SEP] identifier[listener] operator[SEP] operator[SEP] } }
@Produces @Dependent @Claim public JsonNumber getJsonNumber(InjectionPoint injectionPoint) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "getJsonNumber", injectionPoint); } JsonNumber instance = (JsonNumber) getAsJsonValue(getClaimName(injectionPoint)); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.exit(tc, "getJsonNumber", instance); } return instance; }
class class_name[name] begin[{] method[getJsonNumber, return_type[type[JsonNumber]], modifier[public], parameter[injectionPoint]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["getJsonNumber"], member[.injectionPoint]]] else begin[{] None end[}] local_variable[type[JsonNumber], instance] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["getJsonNumber"], member[.instance]]] else begin[{] None end[}] return[member[.instance]] end[}] END[}]
annotation[@] identifier[Produces] annotation[@] identifier[Dependent] annotation[@] identifier[Claim] Keyword[public] identifier[JsonNumber] identifier[getJsonNumber] operator[SEP] identifier[InjectionPoint] identifier[injectionPoint] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , identifier[injectionPoint] operator[SEP] operator[SEP] } identifier[JsonNumber] identifier[instance] operator[=] operator[SEP] identifier[JsonNumber] operator[SEP] identifier[getAsJsonValue] operator[SEP] identifier[getClaimName] operator[SEP] identifier[injectionPoint] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[instance] operator[SEP] operator[SEP] } Keyword[return] identifier[instance] operator[SEP] }
public void populateInfo(List<? extends Profile> profiles) { Map<String, Map<String, Object>> fieldMaps = CollectUtils.newHashMap(); for (Profile profile : profiles) { Map<String, Object> aoDimensions = CollectUtils.newHashMap(); for (Property property : profile.getProperties()) { String value = property.getValue(); String fieldName = property.getDimension().getName(); if (Strings.isNotEmpty(value)) { if (null == property.getDimension().getSource()) { aoDimensions.put(fieldName, value); } else if (value.equals("*")) { aoDimensions.put(fieldName, "不限"); } else { aoDimensions.put(fieldName, profileService.getProperty(profile, property.getDimension())); } } } fieldMaps.put(PropertyUtils.getProperty(profile, "id").toString(), aoDimensions); } ContextHelper.put("profiles", profiles); ContextHelper.put("fieldMaps", fieldMaps); }
class class_name[name] begin[{] method[populateInfo, return_type[void], modifier[public], parameter[profiles]] begin[{] local_variable[type[Map], fieldMaps] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newHashMap, postfix_operators=[], prefix_operators=[], qualifier=CollectUtils, selectors=[], type_arguments=None), name=aoDimensions)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDimension, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=fieldName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNotEmpty, postfix_operators=[], prefix_operators=[], qualifier=Strings, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MethodInvocation(arguments=[], member=getDimension, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[MethodInvocation(arguments=[], member=getSource, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator===), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="*")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=profile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getDimension, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None)], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=profileService, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=aoDimensions, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="不限")], member=put, postfix_operators=[], prefix_operators=[], qualifier=aoDimensions, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=aoDimensions, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getProperties, postfix_operators=[], prefix_operators=[], qualifier=profile, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=property)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Property, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=profile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="id")], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=PropertyUtils, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=aoDimensions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=fieldMaps, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=profiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=profile)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Profile, sub_type=None))), label=None) call[ContextHelper.put, parameter[literal["profiles"], member[.profiles]]] call[ContextHelper.put, parameter[literal["fieldMaps"], member[.fieldMaps]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[populateInfo] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[Profile] operator[>] identifier[profiles] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] identifier[fieldMaps] operator[=] identifier[CollectUtils] operator[SEP] identifier[newHashMap] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Profile] identifier[profile] operator[:] identifier[profiles] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[aoDimensions] operator[=] identifier[CollectUtils] operator[SEP] identifier[newHashMap] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Property] identifier[property] operator[:] identifier[profile] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[value] operator[=] identifier[property] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[fieldName] operator[=] identifier[property] operator[SEP] identifier[getDimension] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Strings] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[value] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[property] operator[SEP] identifier[getDimension] operator[SEP] operator[SEP] operator[SEP] identifier[getSource] operator[SEP] operator[SEP] operator[SEP] { identifier[aoDimensions] operator[SEP] identifier[put] operator[SEP] identifier[fieldName] , identifier[value] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[value] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[aoDimensions] operator[SEP] identifier[put] operator[SEP] identifier[fieldName] , literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[aoDimensions] operator[SEP] identifier[put] operator[SEP] identifier[fieldName] , identifier[profileService] operator[SEP] identifier[getProperty] operator[SEP] identifier[profile] , identifier[property] operator[SEP] identifier[getDimension] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } identifier[fieldMaps] operator[SEP] identifier[put] operator[SEP] identifier[PropertyUtils] operator[SEP] identifier[getProperty] operator[SEP] identifier[profile] , literal[String] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[aoDimensions] operator[SEP] operator[SEP] } identifier[ContextHelper] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[profiles] operator[SEP] operator[SEP] identifier[ContextHelper] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[fieldMaps] operator[SEP] operator[SEP] }
private Optional<CellPosition> getHeaderPosition(final Sheet sheet, final XlsVerticalRecords anno, final FieldAccessor accessor, final Configuration config) throws AnnotationInvalidException, CellNotFoundException { if(Utils.isNotEmpty(anno.headerAddress())) { try { return Optional.of(CellPosition.of(anno.headerAddress())); } catch(IllegalArgumentException e) { throw new AnnotationInvalidException(anno, MessageBuilder.create("anno.attr.invalidAddress") .var("property", accessor.getNameWithClass()) .varWithAnno("anno", XlsVerticalRecords.class) .var("attrName", "headerAddress") .var("attrValue", anno.headerAddress()) .format()); } } else if(Utils.isNotEmpty(anno.tableLabel())) { try { final Cell labelCell = CellFinder.query(sheet, anno.tableLabel(), config).findWhenNotFoundException(); if(anno.tableLabelAbove()) { // 表の見出しが上にある場合、左側に補正する int initColumn = labelCell.getColumnIndex() + anno.right()-1; int initRow = labelCell.getRowIndex() + anno.bottom(); return Optional.of(CellPosition.of(initRow, initColumn)); } else { int initColumn = labelCell.getColumnIndex() + anno.right(); int initRow = labelCell.getRowIndex(); return Optional.of(CellPosition.of(initRow, initColumn)); } } catch(CellNotFoundException ex) { if(anno.optional()) { return Optional.empty(); } else { throw ex; } } } else { if(anno.headerRow() < 0) { throw new AnnotationInvalidException(anno, MessageBuilder.create("anno.attr.min") .var("property", accessor.getNameWithClass()) .varWithAnno("anno", XlsVerticalRecords.class) .var("attrName", "headerRow") .var("attrValue", anno.headerRow()) .var("min", 0) .format()); } if(anno.headerColumn() < 0) { throw new AnnotationInvalidException(anno, MessageBuilder.create("anno.attr.min") .var("property", accessor.getNameWithClass()) .varWithAnno("anno", XlsVerticalRecords.class) .var("attrName", "column") .var("attrValue", anno.headerColumn()) .var("min", 0) .format()); } return Optional.of(CellPosition.of(anno.headerRow(), anno.headerColumn())); } }
class class_name[name] begin[{] method[getHeaderPosition, return_type[type[Optional]], modifier[private], parameter[sheet, anno, accessor, config]] begin[{] if[call[Utils.isNotEmpty, parameter[call[anno.headerAddress, parameter[]]]]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=headerAddress, postfix_operators=[], prefix_operators=[], qualifier=anno, selectors=[], type_arguments=None)], member=of, postfix_operators=[], prefix_operators=[], qualifier=CellPosition, selectors=[], type_arguments=None)], member=of, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=anno, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="anno.attr.invalidAddress")], member=create, postfix_operators=[], prefix_operators=[], qualifier=MessageBuilder, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="property"), MethodInvocation(arguments=[], member=getNameWithClass, postfix_operators=[], prefix_operators=[], qualifier=accessor, selectors=[], type_arguments=None)], member=var, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="anno"), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XlsVerticalRecords, sub_type=None))], member=varWithAnno, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="attrName"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="headerAddress")], member=var, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="attrValue"), MethodInvocation(arguments=[], member=headerAddress, postfix_operators=[], prefix_operators=[], qualifier=anno, selectors=[], type_arguments=None)], member=var, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=format, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AnnotationInvalidException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None) else begin[{] if[call[Utils.isNotEmpty, parameter[call[anno.tableLabel, parameter[]]]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=sheet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=tableLabel, postfix_operators=[], prefix_operators=[], qualifier=anno, selectors=[], type_arguments=None), MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=query, postfix_operators=[], prefix_operators=[], qualifier=CellFinder, selectors=[MethodInvocation(arguments=[], member=findWhenNotFoundException, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=labelCell)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Cell, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=tableLabelAbove, postfix_operators=[], prefix_operators=[], qualifier=anno, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getColumnIndex, postfix_operators=[], prefix_operators=[], qualifier=labelCell, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=right, postfix_operators=[], prefix_operators=[], qualifier=anno, selectors=[], type_arguments=None), operator=+), name=initColumn)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getRowIndex, postfix_operators=[], prefix_operators=[], qualifier=labelCell, selectors=[], type_arguments=None), name=initRow)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=initRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=initColumn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=CellPosition, selectors=[], type_arguments=None)], member=of, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getColumnIndex, postfix_operators=[], prefix_operators=[], qualifier=labelCell, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=right, postfix_operators=[], prefix_operators=[], qualifier=anno, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=initColumn)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getRowIndex, postfix_operators=[], prefix_operators=[], qualifier=labelCell, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=bottom, postfix_operators=[], prefix_operators=[], qualifier=anno, selectors=[], type_arguments=None), operator=+), name=initRow)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=initRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=initColumn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=CellPosition, selectors=[], type_arguments=None)], member=of, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=optional, postfix_operators=[], prefix_operators=[], qualifier=anno, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=empty, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['CellNotFoundException']))], finally_block=None, label=None, resources=None) else begin[{] if[binary_operation[call[anno.headerRow, parameter[]], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=anno, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="anno.attr.min")], member=create, postfix_operators=[], prefix_operators=[], qualifier=MessageBuilder, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="property"), MethodInvocation(arguments=[], member=getNameWithClass, postfix_operators=[], prefix_operators=[], qualifier=accessor, selectors=[], type_arguments=None)], member=var, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="anno"), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XlsVerticalRecords, sub_type=None))], member=varWithAnno, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="attrName"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="headerRow")], member=var, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="attrValue"), MethodInvocation(arguments=[], member=headerRow, postfix_operators=[], prefix_operators=[], qualifier=anno, selectors=[], type_arguments=None)], member=var, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="min"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=var, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=format, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AnnotationInvalidException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[call[anno.headerColumn, parameter[]], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=anno, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="anno.attr.min")], member=create, postfix_operators=[], prefix_operators=[], qualifier=MessageBuilder, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="property"), MethodInvocation(arguments=[], member=getNameWithClass, postfix_operators=[], prefix_operators=[], qualifier=accessor, selectors=[], type_arguments=None)], member=var, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="anno"), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XlsVerticalRecords, sub_type=None))], member=varWithAnno, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="attrName"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="column")], member=var, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="attrValue"), MethodInvocation(arguments=[], member=headerColumn, postfix_operators=[], prefix_operators=[], qualifier=anno, selectors=[], type_arguments=None)], member=var, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="min"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=var, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=format, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AnnotationInvalidException, sub_type=None)), label=None) else begin[{] None end[}] return[call[Optional.of, parameter[call[CellPosition.of, parameter[call[anno.headerRow, parameter[]], call[anno.headerColumn, parameter[]]]]]]] end[}] end[}] end[}] END[}]
Keyword[private] identifier[Optional] operator[<] identifier[CellPosition] operator[>] identifier[getHeaderPosition] operator[SEP] Keyword[final] identifier[Sheet] identifier[sheet] , Keyword[final] identifier[XlsVerticalRecords] identifier[anno] , Keyword[final] identifier[FieldAccessor] identifier[accessor] , Keyword[final] identifier[Configuration] identifier[config] operator[SEP] Keyword[throws] identifier[AnnotationInvalidException] , identifier[CellNotFoundException] { Keyword[if] operator[SEP] identifier[Utils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[anno] operator[SEP] identifier[headerAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[CellPosition] operator[SEP] identifier[of] operator[SEP] identifier[anno] operator[SEP] identifier[headerAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[AnnotationInvalidException] operator[SEP] identifier[anno] , identifier[MessageBuilder] operator[SEP] identifier[create] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[var] operator[SEP] literal[String] , identifier[accessor] operator[SEP] identifier[getNameWithClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[varWithAnno] operator[SEP] literal[String] , identifier[XlsVerticalRecords] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[var] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[var] operator[SEP] literal[String] , identifier[anno] operator[SEP] identifier[headerAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[format] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[Utils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[anno] operator[SEP] identifier[tableLabel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { Keyword[final] identifier[Cell] identifier[labelCell] operator[=] identifier[CellFinder] operator[SEP] identifier[query] operator[SEP] identifier[sheet] , identifier[anno] operator[SEP] identifier[tableLabel] operator[SEP] operator[SEP] , identifier[config] operator[SEP] operator[SEP] identifier[findWhenNotFoundException] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[anno] operator[SEP] identifier[tableLabelAbove] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[initColumn] operator[=] identifier[labelCell] operator[SEP] identifier[getColumnIndex] operator[SEP] operator[SEP] operator[+] identifier[anno] operator[SEP] identifier[right] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] Keyword[int] identifier[initRow] operator[=] identifier[labelCell] operator[SEP] identifier[getRowIndex] operator[SEP] operator[SEP] operator[+] identifier[anno] operator[SEP] identifier[bottom] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[CellPosition] operator[SEP] identifier[of] operator[SEP] identifier[initRow] , identifier[initColumn] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[int] identifier[initColumn] operator[=] identifier[labelCell] operator[SEP] identifier[getColumnIndex] operator[SEP] operator[SEP] operator[+] identifier[anno] operator[SEP] identifier[right] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[initRow] operator[=] identifier[labelCell] operator[SEP] identifier[getRowIndex] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[CellPosition] operator[SEP] identifier[of] operator[SEP] identifier[initRow] , identifier[initColumn] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[CellNotFoundException] identifier[ex] operator[SEP] { Keyword[if] operator[SEP] identifier[anno] operator[SEP] identifier[optional] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] identifier[ex] operator[SEP] } } } Keyword[else] { Keyword[if] operator[SEP] identifier[anno] operator[SEP] identifier[headerRow] operator[SEP] operator[SEP] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[AnnotationInvalidException] operator[SEP] identifier[anno] , identifier[MessageBuilder] operator[SEP] identifier[create] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[var] operator[SEP] literal[String] , identifier[accessor] operator[SEP] identifier[getNameWithClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[varWithAnno] operator[SEP] literal[String] , identifier[XlsVerticalRecords] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[var] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[var] operator[SEP] literal[String] , identifier[anno] operator[SEP] identifier[headerRow] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[var] operator[SEP] literal[String] , Other[0] operator[SEP] operator[SEP] identifier[format] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[anno] operator[SEP] identifier[headerColumn] operator[SEP] operator[SEP] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[AnnotationInvalidException] operator[SEP] identifier[anno] , identifier[MessageBuilder] operator[SEP] identifier[create] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[var] operator[SEP] literal[String] , identifier[accessor] operator[SEP] identifier[getNameWithClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[varWithAnno] operator[SEP] literal[String] , identifier[XlsVerticalRecords] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[var] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[var] operator[SEP] literal[String] , identifier[anno] operator[SEP] identifier[headerColumn] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[var] operator[SEP] literal[String] , Other[0] operator[SEP] operator[SEP] identifier[format] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[CellPosition] operator[SEP] identifier[of] operator[SEP] identifier[anno] operator[SEP] identifier[headerRow] operator[SEP] operator[SEP] , identifier[anno] operator[SEP] identifier[headerColumn] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public final void commitInternalOffsetsToKafka( Map<KafkaTopicPartition, Long> offsets, @Nonnull KafkaCommitCallback commitCallback) throws Exception { // Ignore sentinels. They might appear here if snapshot has started before actual offsets values // replaced sentinels doCommitInternalOffsetsToKafka(filterOutSentinels(offsets), commitCallback); }
class class_name[name] begin[{] method[commitInternalOffsetsToKafka, return_type[void], modifier[final public], parameter[offsets, commitCallback]] begin[{] call[.doCommitInternalOffsetsToKafka, parameter[call[.filterOutSentinels, parameter[member[.offsets]]], member[.commitCallback]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[commitInternalOffsetsToKafka] operator[SEP] identifier[Map] operator[<] identifier[KafkaTopicPartition] , identifier[Long] operator[>] identifier[offsets] , annotation[@] identifier[Nonnull] identifier[KafkaCommitCallback] identifier[commitCallback] operator[SEP] Keyword[throws] identifier[Exception] { identifier[doCommitInternalOffsetsToKafka] operator[SEP] identifier[filterOutSentinels] operator[SEP] identifier[offsets] operator[SEP] , identifier[commitCallback] operator[SEP] operator[SEP] }
public Set<String> keySet() { // Copy key set, so return value is independent from the object's internal data structure final Set<String> retVal = new HashSet<String>(); synchronized (this.confData) { final Iterator<String> it = this.confData.keySet().iterator(); while (it.hasNext()) { retVal.add(it.next()); } } return retVal; }
class class_name[name] begin[{] method[keySet, return_type[type[Set]], modifier[public], parameter[]] begin[{] local_variable[type[Set], retVal] SYNCHRONIZED[THIS[member[None.confData]]] BEGIN[{] local_variable[type[Iterator], it] while[call[it.hasNext, parameter[]]] begin[{] call[retVal.add, parameter[call[it.next, parameter[]]]] end[}] END[}] return[member[.retVal]] end[}] END[}]
Keyword[public] identifier[Set] operator[<] identifier[String] operator[>] identifier[keySet] operator[SEP] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[retVal] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] identifier[confData] operator[SEP] { Keyword[final] identifier[Iterator] operator[<] identifier[String] operator[>] identifier[it] operator[=] Keyword[this] operator[SEP] identifier[confData] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[retVal] operator[SEP] identifier[add] operator[SEP] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[retVal] operator[SEP] }
public static ObjectName getSystemObjectName(final String domainName, final String containerName, final Class theClass) throws MalformedObjectNameException { String tmp = domainName + ":" + "type=" + theClass.getName() + ",name=" + getRelativeName(containerName, theClass); return new ObjectName(tmp); }
class class_name[name] begin[{] method[getSystemObjectName, return_type[type[ObjectName]], modifier[public static], parameter[domainName, containerName, theClass]] begin[{] local_variable[type[String], tmp] return[ClassCreator(arguments=[MemberReference(member=tmp, 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=ObjectName, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ObjectName] identifier[getSystemObjectName] operator[SEP] Keyword[final] identifier[String] identifier[domainName] , Keyword[final] identifier[String] identifier[containerName] , Keyword[final] identifier[Class] identifier[theClass] operator[SEP] Keyword[throws] identifier[MalformedObjectNameException] { identifier[String] identifier[tmp] operator[=] identifier[domainName] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[theClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[getRelativeName] operator[SEP] identifier[containerName] , identifier[theClass] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ObjectName] operator[SEP] identifier[tmp] operator[SEP] operator[SEP] }
private static Schema union(Schema left, Schema right) { if (left.getType() == Schema.Type.UNION) { if (right.getType() == Schema.Type.UNION) { // combine the unions by adding each type in right individually Schema combined = left; for (Schema type : right.getTypes()) { combined = union(combined, type); } return combined; } else { boolean notMerged = true; // combine a union with a non-union by checking if each type will merge List<Schema> types = Lists.newArrayList(); Iterator<Schema> schemas = left.getTypes().iterator(); // try to merge each type and stop when one succeeds while (schemas.hasNext()) { Schema next = schemas.next(); Schema merged = mergeOnly(next, right); if (merged != null) { types.add(merged); notMerged = false; break; } else { // merge didn't work, add the type types.add(next); } } // add the remaining types from the left union while (schemas.hasNext()) { types.add(schemas.next()); } if (notMerged) { types.add(right); } return Schema.createUnion(types); } } else if (right.getType() == Schema.Type.UNION) { return union(right, left); } return Schema.createUnion(ImmutableList.of(left, right)); }
class class_name[name] begin[{] method[union, return_type[type[Schema]], modifier[private static], parameter[left, right]] begin[{] if[binary_operation[call[left.getType, parameter[]], ==, member[Schema.Type.UNION]]] begin[{] if[binary_operation[call[right.getType, parameter[]], ==, member[Schema.Type.UNION]]] begin[{] local_variable[type[Schema], combined] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=combined, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=combined, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=union, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getTypes, postfix_operators=[], prefix_operators=[], qualifier=right, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=type)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Schema, sub_type=None))), label=None) return[member[.combined]] else begin[{] local_variable[type[boolean], notMerged] local_variable[type[List], types] local_variable[type[Iterator], schemas] while[call[schemas.hasNext, parameter[]]] begin[{] local_variable[type[Schema], next] local_variable[type[Schema], merged] if[binary_operation[member[.merged], !=, literal[null]]] begin[{] call[types.add, parameter[member[.merged]]] assign[member[.notMerged], literal[false]] BreakStatement(goto=None, label=None) else begin[{] call[types.add, parameter[member[.next]]] end[}] end[}] while[call[schemas.hasNext, parameter[]]] begin[{] call[types.add, parameter[call[schemas.next, parameter[]]]] end[}] if[member[.notMerged]] begin[{] call[types.add, parameter[member[.right]]] else begin[{] None end[}] return[call[Schema.createUnion, parameter[member[.types]]]] end[}] else begin[{] if[binary_operation[call[right.getType, parameter[]], ==, member[Schema.Type.UNION]]] begin[{] return[call[.union, parameter[member[.right], member[.left]]]] else begin[{] None end[}] end[}] return[call[Schema.createUnion, parameter[call[ImmutableList.of, parameter[member[.left], member[.right]]]]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Schema] identifier[union] operator[SEP] identifier[Schema] identifier[left] , identifier[Schema] identifier[right] operator[SEP] { Keyword[if] operator[SEP] identifier[left] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[Schema] operator[SEP] identifier[Type] operator[SEP] identifier[UNION] operator[SEP] { Keyword[if] operator[SEP] identifier[right] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[Schema] operator[SEP] identifier[Type] operator[SEP] identifier[UNION] operator[SEP] { identifier[Schema] identifier[combined] operator[=] identifier[left] operator[SEP] Keyword[for] operator[SEP] identifier[Schema] identifier[type] operator[:] identifier[right] operator[SEP] identifier[getTypes] operator[SEP] operator[SEP] operator[SEP] { identifier[combined] operator[=] identifier[union] operator[SEP] identifier[combined] , identifier[type] operator[SEP] operator[SEP] } Keyword[return] identifier[combined] operator[SEP] } Keyword[else] { Keyword[boolean] identifier[notMerged] operator[=] literal[boolean] operator[SEP] identifier[List] operator[<] identifier[Schema] operator[>] identifier[types] operator[=] identifier[Lists] operator[SEP] identifier[newArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[Schema] operator[>] identifier[schemas] operator[=] identifier[left] operator[SEP] identifier[getTypes] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[schemas] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Schema] identifier[next] operator[=] identifier[schemas] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[Schema] identifier[merged] operator[=] identifier[mergeOnly] operator[SEP] identifier[next] , identifier[right] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[merged] operator[!=] Other[null] operator[SEP] { identifier[types] operator[SEP] identifier[add] operator[SEP] identifier[merged] operator[SEP] operator[SEP] identifier[notMerged] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } Keyword[else] { identifier[types] operator[SEP] identifier[add] operator[SEP] identifier[next] operator[SEP] operator[SEP] } } Keyword[while] operator[SEP] identifier[schemas] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[types] operator[SEP] identifier[add] operator[SEP] identifier[schemas] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[notMerged] operator[SEP] { identifier[types] operator[SEP] identifier[add] operator[SEP] identifier[right] operator[SEP] operator[SEP] } Keyword[return] identifier[Schema] operator[SEP] identifier[createUnion] operator[SEP] identifier[types] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[right] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[Schema] operator[SEP] identifier[Type] operator[SEP] identifier[UNION] operator[SEP] { Keyword[return] identifier[union] operator[SEP] identifier[right] , identifier[left] operator[SEP] operator[SEP] } Keyword[return] identifier[Schema] operator[SEP] identifier[createUnion] operator[SEP] identifier[ImmutableList] operator[SEP] identifier[of] operator[SEP] identifier[left] , identifier[right] operator[SEP] operator[SEP] operator[SEP] }
public static Router<ServiceConfig> ofVirtualHost(VirtualHost virtualHost, Iterable<ServiceConfig> configs, RejectedPathMappingHandler rejectionHandler) { requireNonNull(virtualHost, "virtualHost"); requireNonNull(configs, "configs"); requireNonNull(rejectionHandler, "rejectionHandler"); final BiConsumer<PathMapping, PathMapping> rejectionConsumer = (mapping, existingMapping) -> { try { rejectionHandler.handleDuplicatePathMapping(virtualHost, mapping, existingMapping); } catch (Exception e) { logger.warn("Unexpected exception from a {}:", RejectedPathMappingHandler.class.getSimpleName(), e); } }; return wrapVirtualHostRouter(defaultRouter(configs, ServiceConfig::pathMapping, rejectionConsumer)); }
class class_name[name] begin[{] method[ofVirtualHost, return_type[type[Router]], modifier[public static], parameter[virtualHost, configs, rejectionHandler]] begin[{] call[.requireNonNull, parameter[member[.virtualHost], literal["virtualHost"]]] call[.requireNonNull, parameter[member[.configs], literal["configs"]]] call[.requireNonNull, parameter[member[.rejectionHandler], literal["rejectionHandler"]]] local_variable[type[BiConsumer], rejectionConsumer] return[call[.wrapVirtualHostRouter, parameter[call[.defaultRouter, parameter[member[.configs], MethodReference(expression=MemberReference(member=ServiceConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=pathMapping, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[]), member[.rejectionConsumer]]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Router] operator[<] identifier[ServiceConfig] operator[>] identifier[ofVirtualHost] operator[SEP] identifier[VirtualHost] identifier[virtualHost] , identifier[Iterable] operator[<] identifier[ServiceConfig] operator[>] identifier[configs] , identifier[RejectedPathMappingHandler] identifier[rejectionHandler] operator[SEP] { identifier[requireNonNull] operator[SEP] identifier[virtualHost] , literal[String] operator[SEP] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[configs] , literal[String] operator[SEP] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[rejectionHandler] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[BiConsumer] operator[<] identifier[PathMapping] , identifier[PathMapping] operator[>] identifier[rejectionConsumer] operator[=] operator[SEP] identifier[mapping] , identifier[existingMapping] operator[SEP] operator[->] { Keyword[try] { identifier[rejectionHandler] operator[SEP] identifier[handleDuplicatePathMapping] operator[SEP] identifier[virtualHost] , identifier[mapping] , identifier[existingMapping] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[RejectedPathMappingHandler] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } operator[SEP] Keyword[return] identifier[wrapVirtualHostRouter] operator[SEP] identifier[defaultRouter] operator[SEP] identifier[configs] , identifier[ServiceConfig] operator[::] identifier[pathMapping] , identifier[rejectionConsumer] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(ExportJobResource exportJobResource, ProtocolMarshaller protocolMarshaller) { if (exportJobResource == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(exportJobResource.getRoleArn(), ROLEARN_BINDING); protocolMarshaller.marshall(exportJobResource.getS3UrlPrefix(), S3URLPREFIX_BINDING); protocolMarshaller.marshall(exportJobResource.getSegmentId(), SEGMENTID_BINDING); protocolMarshaller.marshall(exportJobResource.getSegmentVersion(), SEGMENTVERSION_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[exportJobResource, protocolMarshaller]] begin[{] if[binary_operation[member[.exportJobResource], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRoleArn, postfix_operators=[], prefix_operators=[], qualifier=exportJobResource, selectors=[], type_arguments=None), MemberReference(member=ROLEARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getS3UrlPrefix, postfix_operators=[], prefix_operators=[], qualifier=exportJobResource, selectors=[], type_arguments=None), MemberReference(member=S3URLPREFIX_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSegmentId, postfix_operators=[], prefix_operators=[], qualifier=exportJobResource, selectors=[], type_arguments=None), MemberReference(member=SEGMENTID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSegmentVersion, postfix_operators=[], prefix_operators=[], qualifier=exportJobResource, selectors=[], type_arguments=None), MemberReference(member=SEGMENTVERSION_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ExportJobResource] identifier[exportJobResource] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[exportJobResource] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[exportJobResource] operator[SEP] identifier[getRoleArn] operator[SEP] operator[SEP] , identifier[ROLEARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[exportJobResource] operator[SEP] identifier[getS3UrlPrefix] operator[SEP] operator[SEP] , identifier[S3URLPREFIX_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[exportJobResource] operator[SEP] identifier[getSegmentId] operator[SEP] operator[SEP] , identifier[SEGMENTID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[exportJobResource] operator[SEP] identifier[getSegmentVersion] operator[SEP] operator[SEP] , identifier[SEGMENTVERSION_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public void deleteDB(String dbName) { assertNotEmpty(dbName, "dbName"); delete(new DatabaseURIHelper(getBaseUri(), dbName).getDatabaseUri()); }
class class_name[name] begin[{] method[deleteDB, return_type[void], modifier[public], parameter[dbName]] begin[{] call[.assertNotEmpty, parameter[member[.dbName], literal["dbName"]]] call[.delete, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBaseUri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=dbName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getDatabaseUri, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=DatabaseURIHelper, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[deleteDB] operator[SEP] identifier[String] identifier[dbName] operator[SEP] { identifier[assertNotEmpty] operator[SEP] identifier[dbName] , literal[String] operator[SEP] operator[SEP] identifier[delete] operator[SEP] Keyword[new] identifier[DatabaseURIHelper] operator[SEP] identifier[getBaseUri] operator[SEP] operator[SEP] , identifier[dbName] operator[SEP] operator[SEP] identifier[getDatabaseUri] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public Options put(String key, ICollectionItemOptions value) { options.put(key, value); return this; }
class class_name[name] begin[{] method[put, return_type[type[Options]], modifier[public], parameter[key, value]] begin[{] call[options.put, parameter[member[.key], member[.value]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Options] identifier[put] operator[SEP] identifier[String] identifier[key] , identifier[ICollectionItemOptions] identifier[value] operator[SEP] { identifier[options] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@ConditionalOnClass({Pcap.class, Inet4Address.class, Context.class}) //@ConditionalOnBean({Pcap.Builder.class, Inet4Address.class}) @Bean(CONTEXT_BEAN_NAME) public Context context(@Qualifier(PCAP_BUILDER_BEAN_NAME) Pcap.Builder builder, @Qualifier(NETMASK_BEAN_NAME) Inet4Address netmask) { switch (properties.getPcapType()) { case DEAD: if (LOGGER.isDebugEnabled()) { LOGGER.debug("Opening pcap dead handler : {}", builder); } builder.pcapType(Pcap.PcapType.DEAD); break; case OFFLINE: if (LOGGER.isDebugEnabled()) { LOGGER.debug("Opening pcap offline hadler : {}", builder); } builder.pcapType(Pcap.PcapType.OFFLINE); break; default: if (LOGGER.isDebugEnabled()) { LOGGER.debug("Opening pcap live hadler : {}", builder); } builder.pcapType(Pcap.PcapType.LIVE); break; } Application.run(applicationName, applicationDisplayName, applicationVersion, builder); Context context = Application.getApplicationContext(); if (properties.getFilter() != null) { if (context.pcapCompile(properties.getFilter(), properties.getBpfCompileMode(), netmask.toInt()) == PcapCode.PCAP_OK) { if (context.pcapSetFilter() != PcapCode.PCAP_OK) { if (LOGGER.isWarnEnabled()) { LOGGER.warn(context.pcapGetErr()); } } else { LOGGER.debug("Filter \'{}\' has been applied.", this.properties.getFilter()); } } else { if (LOGGER.isWarnEnabled()) { LOGGER.warn(context.pcapGetErr()); } } } else { if (LOGGER.isDebugEnabled()) { LOGGER.debug("No filter has been applied."); } } return context; }
class class_name[name] begin[{] method[context, return_type[type[Context]], modifier[public], parameter[builder, netmask]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['DEAD'], statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, 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="Opening pcap dead handler : {}"), MemberReference(member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=DEAD, postfix_operators=[], prefix_operators=[], qualifier=Pcap.PcapType, selectors=[])], member=pcapType, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['OFFLINE'], statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, 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="Opening pcap offline hadler : {}"), MemberReference(member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=OFFLINE, postfix_operators=[], prefix_operators=[], qualifier=Pcap.PcapType, selectors=[])], member=pcapType, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, 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="Opening pcap live hadler : {}"), MemberReference(member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=LIVE, postfix_operators=[], prefix_operators=[], qualifier=Pcap.PcapType, selectors=[])], member=pcapType, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])], expression=MethodInvocation(arguments=[], member=getPcapType, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), label=None) call[Application.run, parameter[member[.applicationName], member[.applicationDisplayName], member[.applicationVersion], member[.builder]]] local_variable[type[Context], context] if[binary_operation[call[properties.getFilter, parameter[]], !=, literal[null]]] begin[{] if[binary_operation[call[context.pcapCompile, parameter[call[properties.getFilter, parameter[]], call[properties.getBpfCompileMode, parameter[]], call[netmask.toInt, parameter[]]]], ==, member[PcapCode.PCAP_OK]]] begin[{] if[binary_operation[call[context.pcapSetFilter, parameter[]], !=, member[PcapCode.PCAP_OK]]] begin[{] if[call[LOGGER.isWarnEnabled, parameter[]]] begin[{] call[LOGGER.warn, parameter[call[context.pcapGetErr, parameter[]]]] else begin[{] None end[}] else begin[{] call[LOGGER.debug, parameter[literal["Filter \'{}\' has been applied."], THIS[member[None.properties]call[None.getFilter, parameter[]]]]] end[}] else begin[{] if[call[LOGGER.isWarnEnabled, parameter[]]] begin[{] call[LOGGER.warn, parameter[call[context.pcapGetErr, parameter[]]]] else begin[{] None end[}] end[}] else begin[{] if[call[LOGGER.isDebugEnabled, parameter[]]] begin[{] call[LOGGER.debug, parameter[literal["No filter has been applied."]]] else begin[{] None end[}] end[}] return[member[.context]] end[}] END[}]
annotation[@] identifier[ConditionalOnClass] operator[SEP] { identifier[Pcap] operator[SEP] Keyword[class] , identifier[Inet4Address] operator[SEP] Keyword[class] , identifier[Context] operator[SEP] Keyword[class] } operator[SEP] annotation[@] identifier[Bean] operator[SEP] identifier[CONTEXT_BEAN_NAME] operator[SEP] Keyword[public] identifier[Context] identifier[context] operator[SEP] annotation[@] identifier[Qualifier] operator[SEP] identifier[PCAP_BUILDER_BEAN_NAME] operator[SEP] identifier[Pcap] operator[SEP] identifier[Builder] identifier[builder] , annotation[@] identifier[Qualifier] operator[SEP] identifier[NETMASK_BEAN_NAME] operator[SEP] identifier[Inet4Address] identifier[netmask] operator[SEP] { Keyword[switch] operator[SEP] identifier[properties] operator[SEP] identifier[getPcapType] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[DEAD] operator[:] Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[builder] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[pcapType] operator[SEP] identifier[Pcap] operator[SEP] identifier[PcapType] operator[SEP] identifier[DEAD] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[OFFLINE] operator[:] Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[builder] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[pcapType] operator[SEP] identifier[Pcap] operator[SEP] identifier[PcapType] operator[SEP] identifier[OFFLINE] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[builder] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[pcapType] operator[SEP] identifier[Pcap] operator[SEP] identifier[PcapType] operator[SEP] identifier[LIVE] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } identifier[Application] operator[SEP] identifier[run] operator[SEP] identifier[applicationName] , identifier[applicationDisplayName] , identifier[applicationVersion] , identifier[builder] operator[SEP] operator[SEP] identifier[Context] identifier[context] operator[=] identifier[Application] operator[SEP] identifier[getApplicationContext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[properties] operator[SEP] identifier[getFilter] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[context] operator[SEP] identifier[pcapCompile] operator[SEP] identifier[properties] operator[SEP] identifier[getFilter] operator[SEP] operator[SEP] , identifier[properties] operator[SEP] identifier[getBpfCompileMode] operator[SEP] operator[SEP] , identifier[netmask] operator[SEP] identifier[toInt] operator[SEP] operator[SEP] operator[SEP] operator[==] identifier[PcapCode] operator[SEP] identifier[PCAP_OK] operator[SEP] { Keyword[if] operator[SEP] identifier[context] operator[SEP] identifier[pcapSetFilter] operator[SEP] operator[SEP] operator[!=] identifier[PcapCode] operator[SEP] identifier[PCAP_OK] operator[SEP] { Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isWarnEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] identifier[context] operator[SEP] identifier[pcapGetErr] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , Keyword[this] operator[SEP] identifier[properties] operator[SEP] identifier[getFilter] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isWarnEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] identifier[context] operator[SEP] identifier[pcapGetErr] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[else] { Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[return] identifier[context] operator[SEP] }
private static String byteArrayToHexString(byte[] b) { StringBuilder sb = new StringBuilder(b.length * 2); for (int i = 0; i < b.length; i++) { int v = b[i] & 0xff; if (v < 16) { sb.append('0'); } sb.append(Integer.toHexString(v)); } return sb.toString().toUpperCase(); }
class class_name[name] begin[{] method[byteArrayToHexString, return_type[type[String]], modifier[private static], parameter[b]] begin[{] local_variable[type[StringBuilder], sb] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), name=v)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='0')], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toHexString, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, 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=b, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[byteArrayToHexString] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[b] operator[SEP] identifier[length] operator[*] Other[2] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[b] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[v] operator[=] identifier[b] operator[SEP] identifier[i] operator[SEP] operator[&] literal[Integer] operator[SEP] Keyword[if] operator[SEP] identifier[v] operator[<] Other[16] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[Integer] operator[SEP] identifier[toHexString] operator[SEP] identifier[v] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[SEP] }
@Override public Method resolveFunction(String prefix, String localName) { if (this.memento == null) { this.memento = new FunctionMapperImpl(); } Method m = this.target.resolveFunction(prefix, localName); if (m != null) { this.memento.mapFunction(prefix, localName, m); } return m; }
class class_name[name] begin[{] method[resolveFunction, return_type[type[Method]], modifier[public], parameter[prefix, localName]] begin[{] if[binary_operation[THIS[member[None.memento]], ==, literal[null]]] begin[{] assign[THIS[member[None.memento]], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FunctionMapperImpl, sub_type=None))] else begin[{] None end[}] local_variable[type[Method], m] if[binary_operation[member[.m], !=, literal[null]]] begin[{] THIS[member[None.memento]call[None.mapFunction, parameter[member[.prefix], member[.localName], member[.m]]]] else begin[{] None end[}] return[member[.m]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Method] identifier[resolveFunction] operator[SEP] identifier[String] identifier[prefix] , identifier[String] identifier[localName] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[memento] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[memento] operator[=] Keyword[new] identifier[FunctionMapperImpl] operator[SEP] operator[SEP] operator[SEP] } identifier[Method] identifier[m] operator[=] Keyword[this] operator[SEP] identifier[target] operator[SEP] identifier[resolveFunction] operator[SEP] identifier[prefix] , identifier[localName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[memento] operator[SEP] identifier[mapFunction] operator[SEP] identifier[prefix] , identifier[localName] , identifier[m] operator[SEP] operator[SEP] } Keyword[return] identifier[m] operator[SEP] }
@SuppressWarnings("rawtypes") protected RESTBaseElementV1<?> getEntity(final Object entity) { if (entity instanceof ProxyObject) { final MethodHandler handler = ((ProxyObject) entity).getHandler(); if (handler instanceof RESTBaseEntityV1ProxyHandler) { return ((RESTBaseEntityV1ProxyHandler) handler).getEntity(); } } return (RESTBaseElementV1<?>) entity; }
class class_name[name] begin[{] method[getEntity, return_type[type[RESTBaseElementV1]], modifier[protected], parameter[entity]] begin[{] if[binary_operation[member[.entity], instanceof, type[ProxyObject]]] begin[{] local_variable[type[MethodHandler], handler] if[binary_operation[member[.handler], instanceof, type[RESTBaseEntityV1ProxyHandler]]] begin[{] return[Cast(expression=MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=RESTBaseEntityV1ProxyHandler, sub_type=None))] else begin[{] None end[}] else begin[{] None end[}] return[Cast(expression=MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=RESTBaseElementV1, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[RESTBaseElementV1] operator[<] operator[?] operator[>] identifier[getEntity] operator[SEP] Keyword[final] identifier[Object] identifier[entity] operator[SEP] { Keyword[if] operator[SEP] identifier[entity] Keyword[instanceof] identifier[ProxyObject] operator[SEP] { Keyword[final] identifier[MethodHandler] identifier[handler] operator[=] operator[SEP] operator[SEP] identifier[ProxyObject] operator[SEP] identifier[entity] operator[SEP] operator[SEP] identifier[getHandler] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[handler] Keyword[instanceof] identifier[RESTBaseEntityV1ProxyHandler] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[RESTBaseEntityV1ProxyHandler] operator[SEP] identifier[handler] operator[SEP] operator[SEP] identifier[getEntity] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] operator[SEP] identifier[RESTBaseElementV1] operator[<] operator[?] operator[>] operator[SEP] identifier[entity] operator[SEP] }
public OperationFuture<List<LoadBalancer>> delete(LoadBalancerFilter filter) { List<LoadBalancer> loadBalancerList = findLazy(filter) .map(metadata -> LoadBalancer.refById( metadata.getId(), DataCenter.refById(metadata.getDataCenterId())) ) .collect(toList()); return delete(loadBalancerList); }
class class_name[name] begin[{] method[delete, return_type[type[OperationFuture]], modifier[public], parameter[filter]] begin[{] local_variable[type[List], loadBalancerList] return[call[.delete, parameter[member[.loadBalancerList]]]] end[}] END[}]
Keyword[public] identifier[OperationFuture] operator[<] identifier[List] operator[<] identifier[LoadBalancer] operator[>] operator[>] identifier[delete] operator[SEP] identifier[LoadBalancerFilter] identifier[filter] operator[SEP] { identifier[List] operator[<] identifier[LoadBalancer] operator[>] identifier[loadBalancerList] operator[=] identifier[findLazy] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[metadata] operator[->] identifier[LoadBalancer] operator[SEP] identifier[refById] operator[SEP] identifier[metadata] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[DataCenter] operator[SEP] identifier[refById] operator[SEP] identifier[metadata] operator[SEP] identifier[getDataCenterId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[delete] operator[SEP] identifier[loadBalancerList] operator[SEP] operator[SEP] }
public static WaveletDescription<WlCoef_F32> daubJ_F32( int J ) { if( J != 4 ) { throw new IllegalArgumentException("Only 4 is currently supported"); } WlCoef_F32 coef = new WlCoef_F32(); coef.offsetScaling = 0; coef.offsetWavelet = 0; coef.scaling = new float[4]; coef.wavelet = new float[4]; double sqrt3 = Math.sqrt(3); double div = 4.0*Math.sqrt(2); coef.scaling[0] = (float)((1+sqrt3)/div); coef.scaling[1] = (float)((3+sqrt3)/div); coef.scaling[2] = (float)((3-sqrt3)/div); coef.scaling[3] = (float)((1-sqrt3)/div); coef.wavelet[0] = coef.scaling[3]; coef.wavelet[1] = -coef.scaling[2]; coef.wavelet[2] = coef.scaling[1]; coef.wavelet[3] = -coef.scaling[0]; WlBorderCoefStandard<WlCoef_F32> inverse = new WlBorderCoefStandard<>(coef); return new WaveletDescription<>(new BorderIndex1D_Wrap(), coef, inverse); }
class class_name[name] begin[{] method[daubJ_F32, return_type[type[WaveletDescription]], modifier[public static], parameter[J]] begin[{] if[binary_operation[member[.J], !=, literal[4]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Only 4 is currently supported")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[WlCoef_F32], coef] assign[member[coef.offsetScaling], literal[0]] assign[member[coef.offsetWavelet], literal[0]] assign[member[coef.scaling], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=float))] assign[member[coef.wavelet], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=float))] local_variable[type[double], sqrt3] local_variable[type[double], div] assign[member[coef.scaling], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=MemberReference(member=sqrt3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=div, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), type=BasicType(dimensions=[], name=float))] assign[member[coef.scaling], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operandr=MemberReference(member=sqrt3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=div, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), type=BasicType(dimensions=[], name=float))] assign[member[coef.scaling], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operandr=MemberReference(member=sqrt3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MemberReference(member=div, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), type=BasicType(dimensions=[], name=float))] assign[member[coef.scaling], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=MemberReference(member=sqrt3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MemberReference(member=div, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), type=BasicType(dimensions=[], name=float))] assign[member[coef.wavelet], member[coef.scaling]] assign[member[coef.wavelet], member[coef.scaling]] assign[member[coef.wavelet], member[coef.scaling]] assign[member[coef.wavelet], member[coef.scaling]] local_variable[type[WlBorderCoefStandard], inverse] return[ClassCreator(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BorderIndex1D_Wrap, sub_type=None)), MemberReference(member=coef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=inverse, 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=WaveletDescription, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[WaveletDescription] operator[<] identifier[WlCoef_F32] operator[>] identifier[daubJ_F32] operator[SEP] Keyword[int] identifier[J] operator[SEP] { Keyword[if] operator[SEP] identifier[J] operator[!=] Other[4] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[WlCoef_F32] identifier[coef] operator[=] Keyword[new] identifier[WlCoef_F32] operator[SEP] operator[SEP] operator[SEP] identifier[coef] operator[SEP] identifier[offsetScaling] operator[=] Other[0] operator[SEP] identifier[coef] operator[SEP] identifier[offsetWavelet] operator[=] Other[0] operator[SEP] identifier[coef] operator[SEP] identifier[scaling] operator[=] Keyword[new] Keyword[float] operator[SEP] Other[4] operator[SEP] operator[SEP] identifier[coef] operator[SEP] identifier[wavelet] operator[=] Keyword[new] Keyword[float] operator[SEP] Other[4] operator[SEP] operator[SEP] Keyword[double] identifier[sqrt3] operator[=] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[double] identifier[div] operator[=] literal[Float] operator[*] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[coef] operator[SEP] identifier[scaling] operator[SEP] Other[0] operator[SEP] operator[=] operator[SEP] Keyword[float] operator[SEP] operator[SEP] operator[SEP] Other[1] operator[+] identifier[sqrt3] operator[SEP] operator[/] identifier[div] operator[SEP] operator[SEP] identifier[coef] operator[SEP] identifier[scaling] operator[SEP] Other[1] operator[SEP] operator[=] operator[SEP] Keyword[float] operator[SEP] operator[SEP] operator[SEP] Other[3] operator[+] identifier[sqrt3] operator[SEP] operator[/] identifier[div] operator[SEP] operator[SEP] identifier[coef] operator[SEP] identifier[scaling] operator[SEP] Other[2] operator[SEP] operator[=] operator[SEP] Keyword[float] operator[SEP] operator[SEP] operator[SEP] Other[3] operator[-] identifier[sqrt3] operator[SEP] operator[/] identifier[div] operator[SEP] operator[SEP] identifier[coef] operator[SEP] identifier[scaling] operator[SEP] Other[3] operator[SEP] operator[=] operator[SEP] Keyword[float] operator[SEP] operator[SEP] operator[SEP] Other[1] operator[-] identifier[sqrt3] operator[SEP] operator[/] identifier[div] operator[SEP] operator[SEP] identifier[coef] operator[SEP] identifier[wavelet] operator[SEP] Other[0] operator[SEP] operator[=] identifier[coef] operator[SEP] identifier[scaling] operator[SEP] Other[3] operator[SEP] operator[SEP] identifier[coef] operator[SEP] identifier[wavelet] operator[SEP] Other[1] operator[SEP] operator[=] operator[-] identifier[coef] operator[SEP] identifier[scaling] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[coef] operator[SEP] identifier[wavelet] operator[SEP] Other[2] operator[SEP] operator[=] identifier[coef] operator[SEP] identifier[scaling] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[coef] operator[SEP] identifier[wavelet] operator[SEP] Other[3] operator[SEP] operator[=] operator[-] identifier[coef] operator[SEP] identifier[scaling] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[WlBorderCoefStandard] operator[<] identifier[WlCoef_F32] operator[>] identifier[inverse] operator[=] Keyword[new] identifier[WlBorderCoefStandard] operator[<] operator[>] operator[SEP] identifier[coef] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[WaveletDescription] operator[<] operator[>] operator[SEP] Keyword[new] identifier[BorderIndex1D_Wrap] operator[SEP] operator[SEP] , identifier[coef] , identifier[inverse] operator[SEP] operator[SEP] }
@Override public RegisterToWorkMailResult registerToWorkMail(RegisterToWorkMailRequest request) { request = beforeClientExecution(request); return executeRegisterToWorkMail(request); }
class class_name[name] begin[{] method[registerToWorkMail, return_type[type[RegisterToWorkMailResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeRegisterToWorkMail, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[RegisterToWorkMailResult] identifier[registerToWorkMail] operator[SEP] identifier[RegisterToWorkMailRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeRegisterToWorkMail] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Nonnull MapcodeZone restrictZoneTo(@Nonnull final Boundary area) { final MapcodeZone mapcodeZone = new MapcodeZone(latFractionMin, latFractionMax, lonFractionMin, lonFractionMax); final double latMin = area.getLatMicroDegMin() * Point.LAT_MICRODEG_TO_FRACTIONS_FACTOR; if (mapcodeZone.latFractionMin < latMin) { mapcodeZone.latFractionMin = latMin; } final double latMax = area.getLatMicroDegMax() * Point.LAT_MICRODEG_TO_FRACTIONS_FACTOR; if (mapcodeZone.latFractionMax > latMax) { mapcodeZone.latFractionMax = latMax; } if (mapcodeZone.latFractionMin < mapcodeZone.latFractionMax) { double lonMin = area.getLonMicroDegMin() * Point.LON_MICRODEG_TO_FRACTIONS_FACTOR; double lonMax = area.getLonMicroDegMax() * Point.LON_MICRODEG_TO_FRACTIONS_FACTOR; if ((lonMax < 0) && (mapcodeZone.lonFractionMin > 0)) { lonMin += (Point.MICRO_DEG_360 * Point.LON_MICRODEG_TO_FRACTIONS_FACTOR); lonMax += (Point.MICRO_DEG_360 * Point.LON_MICRODEG_TO_FRACTIONS_FACTOR); } else if ((lonMin > 1) && (mapcodeZone.lonFractionMax < 0)) { lonMin -= (Point.MICRO_DEG_360 * Point.LON_MICRODEG_TO_FRACTIONS_FACTOR); lonMax -= (Point.MICRO_DEG_360 * Point.LON_MICRODEG_TO_FRACTIONS_FACTOR); } if (mapcodeZone.lonFractionMin < lonMin) { mapcodeZone.lonFractionMin = lonMin; } if (mapcodeZone.lonFractionMax > lonMax) { mapcodeZone.lonFractionMax = lonMax; } } return mapcodeZone; }
class class_name[name] begin[{] method[restrictZoneTo, return_type[type[MapcodeZone]], modifier[default], parameter[area]] begin[{] local_variable[type[MapcodeZone], mapcodeZone] local_variable[type[double], latMin] if[binary_operation[member[mapcodeZone.latFractionMin], <, member[.latMin]]] begin[{] assign[member[mapcodeZone.latFractionMin], member[.latMin]] else begin[{] None end[}] local_variable[type[double], latMax] if[binary_operation[member[mapcodeZone.latFractionMax], >, member[.latMax]]] begin[{] assign[member[mapcodeZone.latFractionMax], member[.latMax]] else begin[{] None end[}] if[binary_operation[member[mapcodeZone.latFractionMin], <, member[mapcodeZone.latFractionMax]]] begin[{] local_variable[type[double], lonMin] local_variable[type[double], lonMax] if[binary_operation[binary_operation[member[.lonMax], <, literal[0]], &&, binary_operation[member[mapcodeZone.lonFractionMin], >, literal[0]]]] begin[{] assign[member[.lonMin], binary_operation[member[Point.MICRO_DEG_360], *, member[Point.LON_MICRODEG_TO_FRACTIONS_FACTOR]]] assign[member[.lonMax], binary_operation[member[Point.MICRO_DEG_360], *, member[Point.LON_MICRODEG_TO_FRACTIONS_FACTOR]]] else begin[{] if[binary_operation[binary_operation[member[.lonMin], >, literal[1]], &&, binary_operation[member[mapcodeZone.lonFractionMax], <, literal[0]]]] begin[{] assign[member[.lonMin], binary_operation[member[Point.MICRO_DEG_360], *, member[Point.LON_MICRODEG_TO_FRACTIONS_FACTOR]]] assign[member[.lonMax], binary_operation[member[Point.MICRO_DEG_360], *, member[Point.LON_MICRODEG_TO_FRACTIONS_FACTOR]]] else begin[{] None end[}] end[}] if[binary_operation[member[mapcodeZone.lonFractionMin], <, member[.lonMin]]] begin[{] assign[member[mapcodeZone.lonFractionMin], member[.lonMin]] else begin[{] None end[}] if[binary_operation[member[mapcodeZone.lonFractionMax], >, member[.lonMax]]] begin[{] assign[member[mapcodeZone.lonFractionMax], member[.lonMax]] else begin[{] None end[}] else begin[{] None end[}] return[member[.mapcodeZone]] end[}] END[}]
annotation[@] identifier[Nonnull] identifier[MapcodeZone] identifier[restrictZoneTo] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Boundary] identifier[area] operator[SEP] { Keyword[final] identifier[MapcodeZone] identifier[mapcodeZone] operator[=] Keyword[new] identifier[MapcodeZone] operator[SEP] identifier[latFractionMin] , identifier[latFractionMax] , identifier[lonFractionMin] , identifier[lonFractionMax] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[latMin] operator[=] identifier[area] operator[SEP] identifier[getLatMicroDegMin] operator[SEP] operator[SEP] operator[*] identifier[Point] operator[SEP] identifier[LAT_MICRODEG_TO_FRACTIONS_FACTOR] operator[SEP] Keyword[if] operator[SEP] identifier[mapcodeZone] operator[SEP] identifier[latFractionMin] operator[<] identifier[latMin] operator[SEP] { identifier[mapcodeZone] operator[SEP] identifier[latFractionMin] operator[=] identifier[latMin] operator[SEP] } Keyword[final] Keyword[double] identifier[latMax] operator[=] identifier[area] operator[SEP] identifier[getLatMicroDegMax] operator[SEP] operator[SEP] operator[*] identifier[Point] operator[SEP] identifier[LAT_MICRODEG_TO_FRACTIONS_FACTOR] operator[SEP] Keyword[if] operator[SEP] identifier[mapcodeZone] operator[SEP] identifier[latFractionMax] operator[>] identifier[latMax] operator[SEP] { identifier[mapcodeZone] operator[SEP] identifier[latFractionMax] operator[=] identifier[latMax] operator[SEP] } Keyword[if] operator[SEP] identifier[mapcodeZone] operator[SEP] identifier[latFractionMin] operator[<] identifier[mapcodeZone] operator[SEP] identifier[latFractionMax] operator[SEP] { Keyword[double] identifier[lonMin] operator[=] identifier[area] operator[SEP] identifier[getLonMicroDegMin] operator[SEP] operator[SEP] operator[*] identifier[Point] operator[SEP] identifier[LON_MICRODEG_TO_FRACTIONS_FACTOR] operator[SEP] Keyword[double] identifier[lonMax] operator[=] identifier[area] operator[SEP] identifier[getLonMicroDegMax] operator[SEP] operator[SEP] operator[*] identifier[Point] operator[SEP] identifier[LON_MICRODEG_TO_FRACTIONS_FACTOR] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[lonMax] operator[<] Other[0] operator[SEP] operator[&&] operator[SEP] identifier[mapcodeZone] operator[SEP] identifier[lonFractionMin] operator[>] Other[0] operator[SEP] operator[SEP] { identifier[lonMin] operator[+=] operator[SEP] identifier[Point] operator[SEP] identifier[MICRO_DEG_360] operator[*] identifier[Point] operator[SEP] identifier[LON_MICRODEG_TO_FRACTIONS_FACTOR] operator[SEP] operator[SEP] identifier[lonMax] operator[+=] operator[SEP] identifier[Point] operator[SEP] identifier[MICRO_DEG_360] operator[*] identifier[Point] operator[SEP] identifier[LON_MICRODEG_TO_FRACTIONS_FACTOR] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[lonMin] operator[>] Other[1] operator[SEP] operator[&&] operator[SEP] identifier[mapcodeZone] operator[SEP] identifier[lonFractionMax] operator[<] Other[0] operator[SEP] operator[SEP] { identifier[lonMin] operator[-=] operator[SEP] identifier[Point] operator[SEP] identifier[MICRO_DEG_360] operator[*] identifier[Point] operator[SEP] identifier[LON_MICRODEG_TO_FRACTIONS_FACTOR] operator[SEP] operator[SEP] identifier[lonMax] operator[-=] operator[SEP] identifier[Point] operator[SEP] identifier[MICRO_DEG_360] operator[*] identifier[Point] operator[SEP] identifier[LON_MICRODEG_TO_FRACTIONS_FACTOR] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[mapcodeZone] operator[SEP] identifier[lonFractionMin] operator[<] identifier[lonMin] operator[SEP] { identifier[mapcodeZone] operator[SEP] identifier[lonFractionMin] operator[=] identifier[lonMin] operator[SEP] } Keyword[if] operator[SEP] identifier[mapcodeZone] operator[SEP] identifier[lonFractionMax] operator[>] identifier[lonMax] operator[SEP] { identifier[mapcodeZone] operator[SEP] identifier[lonFractionMax] operator[=] identifier[lonMax] operator[SEP] } } Keyword[return] identifier[mapcodeZone] operator[SEP] }
protected void debug(String msg, Object... args) { if (processingEnv.getOptions().containsKey("debug")) { messager.printMessage(NOTE, String.format(msg, args)); } }
class class_name[name] begin[{] method[debug, return_type[void], modifier[protected], parameter[msg, args]] begin[{] if[call[processingEnv.getOptions, parameter[]]] begin[{] call[messager.printMessage, parameter[member[.NOTE], call[String.format, parameter[member[.msg], member[.args]]]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[debug] operator[SEP] identifier[String] identifier[msg] , identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[if] operator[SEP] identifier[processingEnv] operator[SEP] identifier[getOptions] operator[SEP] operator[SEP] operator[SEP] identifier[containsKey] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[messager] operator[SEP] identifier[printMessage] operator[SEP] identifier[NOTE] , identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[msg] , identifier[args] operator[SEP] operator[SEP] operator[SEP] } }
protected synchronized void shutdown() throws ObjectManagerException { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass , "shutDown" ); setState(nextStateForShutdown); // Any attempt by any therad to do anything with this Transaction // from now on will result in a InvalidStateException. if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.exit(this, cclass , "shutdown" ); }
class class_name[name] begin[{] method[shutdown, return_type[void], modifier[synchronized protected], parameter[]] begin[{] if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryEnabled, parameter[]]]] begin[{] call[trace.entry, parameter[THIS[], member[.cclass], literal["shutDown"]]] else begin[{] None end[}] call[.setState, parameter[member[.nextStateForShutdown]]] if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryEnabled, parameter[]]]] begin[{] call[trace.exit, parameter[THIS[], member[.cclass], literal["shutdown"]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[synchronized] Keyword[void] identifier[shutdown] operator[SEP] operator[SEP] Keyword[throws] identifier[ObjectManagerException] { Keyword[if] operator[SEP] identifier[Tracing] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[trace] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[trace] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[cclass] , literal[String] operator[SEP] operator[SEP] identifier[setState] operator[SEP] identifier[nextStateForShutdown] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Tracing] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[trace] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[trace] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[cclass] , literal[String] operator[SEP] operator[SEP] }
private void updatePoint() { clearImagePoint(); CmsPoint nativePoint; if (m_focalPoint == null) { CmsPoint cropCenter = getCropCenter(); nativePoint = cropCenter; } else if (!getNativeCropRegion().contains(m_focalPoint)) { return; } else { nativePoint = m_focalPoint; } m_pointWidget = new CmsFocalPoint(CmsFocalPointController.this); boolean isDefault = m_savedFocalPoint == null; m_pointWidget.setIsDefault(isDefault); m_container.add(m_pointWidget); CmsPoint screenPoint = m_coordinateTransform.transformBack(nativePoint); m_pointWidget.setCenterCoordsRelativeToParent((int)screenPoint.getX(), (int)screenPoint.getY()); }
class class_name[name] begin[{] method[updatePoint, return_type[void], modifier[private], parameter[]] begin[{] call[.clearImagePoint, parameter[]] local_variable[type[CmsPoint], nativePoint] if[binary_operation[member[.m_focalPoint], ==, literal[null]]] begin[{] local_variable[type[CmsPoint], cropCenter] assign[member[.nativePoint], member[.cropCenter]] else begin[{] if[call[.getNativeCropRegion, parameter[]]] begin[{] return[None] else begin[{] assign[member[.nativePoint], member[.m_focalPoint]] end[}] end[}] assign[member[.m_pointWidget], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=CmsFocalPointController, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmsFocalPoint, sub_type=None))] local_variable[type[boolean], isDefault] call[m_pointWidget.setIsDefault, parameter[member[.isDefault]]] call[m_container.add, parameter[member[.m_pointWidget]]] local_variable[type[CmsPoint], screenPoint] call[m_pointWidget.setCenterCoordsRelativeToParent, parameter[Cast(expression=MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=screenPoint, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int)), Cast(expression=MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=screenPoint, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))]] end[}] END[}]
Keyword[private] Keyword[void] identifier[updatePoint] operator[SEP] operator[SEP] { identifier[clearImagePoint] operator[SEP] operator[SEP] operator[SEP] identifier[CmsPoint] identifier[nativePoint] operator[SEP] Keyword[if] operator[SEP] identifier[m_focalPoint] operator[==] Other[null] operator[SEP] { identifier[CmsPoint] identifier[cropCenter] operator[=] identifier[getCropCenter] operator[SEP] operator[SEP] operator[SEP] identifier[nativePoint] operator[=] identifier[cropCenter] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[getNativeCropRegion] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[m_focalPoint] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } Keyword[else] { identifier[nativePoint] operator[=] identifier[m_focalPoint] operator[SEP] } identifier[m_pointWidget] operator[=] Keyword[new] identifier[CmsFocalPoint] operator[SEP] identifier[CmsFocalPointController] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[boolean] identifier[isDefault] operator[=] identifier[m_savedFocalPoint] operator[==] Other[null] operator[SEP] identifier[m_pointWidget] operator[SEP] identifier[setIsDefault] operator[SEP] identifier[isDefault] operator[SEP] operator[SEP] identifier[m_container] operator[SEP] identifier[add] operator[SEP] identifier[m_pointWidget] operator[SEP] operator[SEP] identifier[CmsPoint] identifier[screenPoint] operator[=] identifier[m_coordinateTransform] operator[SEP] identifier[transformBack] operator[SEP] identifier[nativePoint] operator[SEP] operator[SEP] identifier[m_pointWidget] operator[SEP] identifier[setCenterCoordsRelativeToParent] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[screenPoint] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] identifier[screenPoint] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static BasicVector random(int length, Random random) { double[] array = new double[length]; for (int i = 0; i < length; i++) { array[i] = random.nextDouble(); } return new BasicVector(array); }
class class_name[name] begin[{] method[random, return_type[type[BasicVector]], modifier[public static], parameter[length, random]] begin[{] local_variable[type[double], array] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[], member=nextDouble, postfix_operators=[], prefix_operators=[], qualifier=random, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[ClassCreator(arguments=[MemberReference(member=array, 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=BasicVector, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[BasicVector] identifier[random] operator[SEP] Keyword[int] identifier[length] , identifier[Random] identifier[random] operator[SEP] { Keyword[double] operator[SEP] operator[SEP] identifier[array] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[array] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[random] operator[SEP] identifier[nextDouble] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[BasicVector] operator[SEP] identifier[array] operator[SEP] operator[SEP] }
@Deprecated(/* Use script directly with appropriate paths */) public static AnalysisEngineDescription getBrainregionRules() throws ResourceInitializationException { return createEngineDescription(RutaEngine.class,// PARAM_MAIN_SCRIPT, "Main",// PARAM_SCRIPT_PATHS, BRAIN_REGIONS_HOME + RESOURCES_PATH + "ruta",// PARAM_RESOURCE_PATHS, LEXICON_HOME); }
class class_name[name] begin[{] method[getBrainregionRules, return_type[type[AnalysisEngineDescription]], modifier[public static], parameter[]] begin[{] return[call[.createEngineDescription, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RutaEngine, sub_type=None)), member[.PARAM_MAIN_SCRIPT], literal["Main"], member[.PARAM_SCRIPT_PATHS], binary_operation[binary_operation[member[.BRAIN_REGIONS_HOME], +, member[.RESOURCES_PATH]], +, literal["ruta"]], member[.PARAM_RESOURCE_PATHS], member[.LEXICON_HOME]]]] end[}] END[}]
annotation[@] identifier[Deprecated] operator[SEP] operator[SEP] Keyword[public] Keyword[static] identifier[AnalysisEngineDescription] identifier[getBrainregionRules] operator[SEP] operator[SEP] Keyword[throws] identifier[ResourceInitializationException] { Keyword[return] identifier[createEngineDescription] operator[SEP] identifier[RutaEngine] operator[SEP] Keyword[class] , identifier[PARAM_MAIN_SCRIPT] , literal[String] , identifier[PARAM_SCRIPT_PATHS] , identifier[BRAIN_REGIONS_HOME] operator[+] identifier[RESOURCES_PATH] operator[+] literal[String] , identifier[PARAM_RESOURCE_PATHS] , identifier[LEXICON_HOME] operator[SEP] operator[SEP] }
public static <T extends Object & Comparable<? super T>> Pair<T, T> minAndMax(Collection<? extends T> coll) { Iterator<? extends T> i = coll.iterator(); T minCandidate = i.next(); T maxCandidate = minCandidate; while (i.hasNext()) { T next = i.next(); if (next.compareTo(minCandidate) < 0) { minCandidate = next; } else if (next.compareTo(maxCandidate) > 0) { maxCandidate = next; } } return Pair.of(minCandidate, maxCandidate); }
class class_name[name] begin[{] method[minAndMax, return_type[type[Pair]], modifier[public static], parameter[coll]] begin[{] local_variable[type[Iterator], i] local_variable[type[T], minCandidate] local_variable[type[T], maxCandidate] while[call[i.hasNext, parameter[]]] begin[{] local_variable[type[T], next] if[binary_operation[call[next.compareTo, parameter[member[.minCandidate]]], <, literal[0]]] begin[{] assign[member[.minCandidate], member[.next]] else begin[{] if[binary_operation[call[next.compareTo, parameter[member[.maxCandidate]]], >, literal[0]]] begin[{] assign[member[.maxCandidate], member[.next]] else begin[{] None end[}] end[}] end[}] return[call[Pair.of, parameter[member[.minCandidate], member[.maxCandidate]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Object] operator[&] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] identifier[Pair] operator[<] identifier[T] , identifier[T] operator[>] identifier[minAndMax] operator[SEP] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[coll] operator[SEP] { identifier[Iterator] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[i] operator[=] identifier[coll] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[T] identifier[minCandidate] operator[=] identifier[i] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[T] identifier[maxCandidate] operator[=] identifier[minCandidate] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[T] identifier[next] operator[=] identifier[i] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[next] operator[SEP] identifier[compareTo] operator[SEP] identifier[minCandidate] operator[SEP] operator[<] Other[0] operator[SEP] { identifier[minCandidate] operator[=] identifier[next] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[next] operator[SEP] identifier[compareTo] operator[SEP] identifier[maxCandidate] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[maxCandidate] operator[=] identifier[next] operator[SEP] } } Keyword[return] identifier[Pair] operator[SEP] identifier[of] operator[SEP] identifier[minCandidate] , identifier[maxCandidate] operator[SEP] operator[SEP] }
@Generated(value={"com.threerings.presents.tools.GenDObjectTask"}) public void addToLocks (NodeObject.Lock elem) { requestEntryAdd(LOCKS, locks, elem); }
class class_name[name] begin[{] method[addToLocks, return_type[void], modifier[public], parameter[elem]] begin[{] call[.requestEntryAdd, parameter[member[.LOCKS], member[.locks], member[.elem]]] end[}] END[}]
annotation[@] identifier[Generated] operator[SEP] identifier[value] operator[=] { literal[String] } operator[SEP] Keyword[public] Keyword[void] identifier[addToLocks] operator[SEP] identifier[NodeObject] operator[SEP] identifier[Lock] identifier[elem] operator[SEP] { identifier[requestEntryAdd] operator[SEP] identifier[LOCKS] , identifier[locks] , identifier[elem] operator[SEP] operator[SEP] }
public static int putShortString(ByteBuffer buf, String value) { return putShortString(ZMQ.CHARSET, buf, value); }
class class_name[name] begin[{] method[putShortString, return_type[type[int]], modifier[public static], parameter[buf, value]] begin[{] return[call[.putShortString, parameter[member[ZMQ.CHARSET], member[.buf], member[.value]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[putShortString] operator[SEP] identifier[ByteBuffer] identifier[buf] , identifier[String] identifier[value] operator[SEP] { Keyword[return] identifier[putShortString] operator[SEP] identifier[ZMQ] operator[SEP] identifier[CHARSET] , identifier[buf] , identifier[value] operator[SEP] operator[SEP] }
public IfcCoilTypeEnum createIfcCoilTypeEnumFromString(EDataType eDataType, String initialValue) { IfcCoilTypeEnum result = IfcCoilTypeEnum.get(initialValue); if (result == null) throw new IllegalArgumentException( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return result; }
class class_name[name] begin[{] method[createIfcCoilTypeEnumFromString, return_type[type[IfcCoilTypeEnum]], modifier[public], parameter[eDataType, initialValue]] begin[{] local_variable[type[IfcCoilTypeEnum], result] if[binary_operation[member[.result], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The value '"), operandr=MemberReference(member=initialValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is not a valid enumerator of '"), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=eDataType, 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=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[IfcCoilTypeEnum] identifier[createIfcCoilTypeEnumFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] { identifier[IfcCoilTypeEnum] identifier[result] operator[=] identifier[IfcCoilTypeEnum] operator[SEP] identifier[get] operator[SEP] identifier[initialValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[initialValue] operator[+] literal[String] operator[+] identifier[eDataType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public static void registerListener(Context context, PlaybackListener listener) { IntentFilter filter = new IntentFilter(); filter.addAction(PlaybackListener.ACTION_ON_TRACK_PLAYED); filter.addAction(PlaybackListener.ACTION_ON_PLAYER_PAUSED); filter.addAction(PlaybackListener.ACTION_ON_SEEK_COMPLETE); filter.addAction(PlaybackListener.ACTION_ON_PLAYER_DESTROYED); filter.addAction(PlaybackListener.ACTION_ON_BUFFERING_STARTED); filter.addAction(PlaybackListener.ACTION_ON_BUFFERING_ENDED); filter.addAction(PlaybackListener.ACTION_ON_PROGRESS_CHANGED); LocalBroadcastManager.getInstance(context.getApplicationContext()) .registerReceiver(listener, filter); }
class class_name[name] begin[{] method[registerListener, return_type[void], modifier[public static], parameter[context, listener]] begin[{] local_variable[type[IntentFilter], filter] call[filter.addAction, parameter[member[PlaybackListener.ACTION_ON_TRACK_PLAYED]]] call[filter.addAction, parameter[member[PlaybackListener.ACTION_ON_PLAYER_PAUSED]]] call[filter.addAction, parameter[member[PlaybackListener.ACTION_ON_SEEK_COMPLETE]]] call[filter.addAction, parameter[member[PlaybackListener.ACTION_ON_PLAYER_DESTROYED]]] call[filter.addAction, parameter[member[PlaybackListener.ACTION_ON_BUFFERING_STARTED]]] call[filter.addAction, parameter[member[PlaybackListener.ACTION_ON_BUFFERING_ENDED]]] call[filter.addAction, parameter[member[PlaybackListener.ACTION_ON_PROGRESS_CHANGED]]] call[LocalBroadcastManager.getInstance, parameter[call[context.getApplicationContext, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[registerListener] operator[SEP] identifier[Context] identifier[context] , identifier[PlaybackListener] identifier[listener] operator[SEP] { identifier[IntentFilter] identifier[filter] operator[=] Keyword[new] identifier[IntentFilter] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[addAction] operator[SEP] identifier[PlaybackListener] operator[SEP] identifier[ACTION_ON_TRACK_PLAYED] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[addAction] operator[SEP] identifier[PlaybackListener] operator[SEP] identifier[ACTION_ON_PLAYER_PAUSED] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[addAction] operator[SEP] identifier[PlaybackListener] operator[SEP] identifier[ACTION_ON_SEEK_COMPLETE] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[addAction] operator[SEP] identifier[PlaybackListener] operator[SEP] identifier[ACTION_ON_PLAYER_DESTROYED] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[addAction] operator[SEP] identifier[PlaybackListener] operator[SEP] identifier[ACTION_ON_BUFFERING_STARTED] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[addAction] operator[SEP] identifier[PlaybackListener] operator[SEP] identifier[ACTION_ON_BUFFERING_ENDED] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[addAction] operator[SEP] identifier[PlaybackListener] operator[SEP] identifier[ACTION_ON_PROGRESS_CHANGED] operator[SEP] operator[SEP] identifier[LocalBroadcastManager] operator[SEP] identifier[getInstance] operator[SEP] identifier[context] operator[SEP] identifier[getApplicationContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[registerReceiver] operator[SEP] identifier[listener] , identifier[filter] operator[SEP] operator[SEP] }
public List<FogbugzMilestone> getMilestones() { try { HashMap<String, String> params = new HashMap<String, String>(); // Hashmap defaults to <String, String> params.put("cmd", "listFixFors"); Document doc = this.getFogbugzDocument(params); List<FogbugzMilestone> milestoneList = new ArrayList<FogbugzMilestone>(); NodeList milestonesNodeList = doc.getElementsByTagName("fixfor"); if (milestonesNodeList != null && milestonesNodeList.getLength() != 0) { for (int i = 0; i < milestonesNodeList.getLength(); i++) { Element currentNode = (Element) milestonesNodeList.item(i); // Construct event object from retrieved data. milestoneList.add(new FogbugzMilestone( Integer.parseInt(currentNode.getElementsByTagName("ixFixFor").item(0).getTextContent()), currentNode.getElementsByTagName("sFixFor").item(0).getTextContent(), Boolean.valueOf(currentNode.getElementsByTagName("fDeleted").item(0).getTextContent()), Boolean.valueOf(currentNode.getElementsByTagName("fReallyDeleted").item(0).getTextContent()) )); } } return milestoneList; } catch (Exception e) { FogbugzManager.log.log(Level.SEVERE, "Exception while fetching milestones", e); } return new ArrayList<FogbugzMilestone>(); }
class class_name[name] begin[{] method[getMilestones, return_type[type[List]], modifier[public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[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)), name=params)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=HashMap, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="cmd"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="listFixFors")], member=put, postfix_operators=[], prefix_operators=[], qualifier=params, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFogbugzDocument, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=doc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Document, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=FogbugzMilestone, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=milestoneList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=FogbugzMilestone, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="fixfor")], member=getElementsByTagName, postfix_operators=[], prefix_operators=[], qualifier=doc, selectors=[], type_arguments=None), name=milestonesNodeList)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NodeList, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=milestonesNodeList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=milestonesNodeList, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=item, postfix_operators=[], prefix_operators=[], qualifier=milestonesNodeList, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), name=currentNode)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ixFixFor")], member=getElementsByTagName, postfix_operators=[], prefix_operators=[], qualifier=currentNode, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=item, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getTextContent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="sFixFor")], member=getElementsByTagName, postfix_operators=[], prefix_operators=[], qualifier=currentNode, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=item, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getTextContent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="fDeleted")], member=getElementsByTagName, postfix_operators=[], prefix_operators=[], qualifier=currentNode, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=item, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getTextContent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="fReallyDeleted")], member=getElementsByTagName, postfix_operators=[], prefix_operators=[], qualifier=currentNode, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=item, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getTextContent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FogbugzMilestone, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=milestoneList, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=milestonesNodeList, 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)])), ReturnStatement(expression=MemberReference(member=milestoneList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception while fetching milestones"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=FogbugzManager.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) return[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=FogbugzMilestone, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[FogbugzMilestone] operator[>] identifier[getMilestones] operator[SEP] operator[SEP] { Keyword[try] { identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[Document] identifier[doc] operator[=] Keyword[this] operator[SEP] identifier[getFogbugzDocument] operator[SEP] identifier[params] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[FogbugzMilestone] operator[>] identifier[milestoneList] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[FogbugzMilestone] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[NodeList] identifier[milestonesNodeList] operator[=] identifier[doc] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[milestonesNodeList] operator[!=] Other[null] operator[&&] identifier[milestonesNodeList] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[milestonesNodeList] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Element] identifier[currentNode] operator[=] operator[SEP] identifier[Element] operator[SEP] identifier[milestonesNodeList] operator[SEP] identifier[item] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[milestoneList] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[FogbugzMilestone] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[currentNode] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[item] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getTextContent] operator[SEP] operator[SEP] operator[SEP] , identifier[currentNode] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[item] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getTextContent] operator[SEP] operator[SEP] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[currentNode] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[item] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getTextContent] operator[SEP] operator[SEP] operator[SEP] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[currentNode] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[item] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getTextContent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[milestoneList] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[FogbugzManager] operator[SEP] identifier[log] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[ArrayList] operator[<] identifier[FogbugzMilestone] operator[>] operator[SEP] operator[SEP] operator[SEP] }
public static File writeObjectToFile(File folder, Serializable serializable) throws IOException { Assert.notNull(folder, "文件夹不能为空"); if (!folder.exists()) { folder.mkdirs(); } Assert.isTrue(folder.isDirectory(), folder + "不是文件夹"); File file = new File(folder, System.currentTimeMillis() + nextIndex() + ""); ObjectOutputStream outputStream = new ObjectOutputStream(new FileOutputStream(file)); outputStream.writeObject(serializable); outputStream.flush(); outputStream.close(); return file; }
class class_name[name] begin[{] method[writeObjectToFile, return_type[type[File]], modifier[public static], parameter[folder, serializable]] begin[{] call[Assert.notNull, parameter[member[.folder], literal["文件夹不能为空"]]] if[call[folder.exists, parameter[]]] begin[{] call[folder.mkdirs, parameter[]] else begin[{] None end[}] call[Assert.isTrue, parameter[call[folder.isDirectory, parameter[]], binary_operation[member[.folder], +, literal["不是文件夹"]]]] local_variable[type[File], file] local_variable[type[ObjectOutputStream], outputStream] call[outputStream.writeObject, parameter[member[.serializable]]] call[outputStream.flush, parameter[]] call[outputStream.close, parameter[]] return[member[.file]] end[}] END[}]
Keyword[public] Keyword[static] identifier[File] identifier[writeObjectToFile] operator[SEP] identifier[File] identifier[folder] , identifier[Serializable] identifier[serializable] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[folder] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[folder] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[folder] operator[SEP] identifier[mkdirs] operator[SEP] operator[SEP] operator[SEP] } identifier[Assert] operator[SEP] identifier[isTrue] operator[SEP] identifier[folder] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] , identifier[folder] operator[+] literal[String] operator[SEP] operator[SEP] identifier[File] identifier[file] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[folder] , identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[+] identifier[nextIndex] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[ObjectOutputStream] identifier[outputStream] operator[=] Keyword[new] identifier[ObjectOutputStream] operator[SEP] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[file] operator[SEP] operator[SEP] operator[SEP] identifier[outputStream] operator[SEP] identifier[writeObject] operator[SEP] identifier[serializable] operator[SEP] operator[SEP] identifier[outputStream] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[outputStream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[file] operator[SEP] }
@Override public InputStream getFileStream(String file) throws FileBasedHelperException { SftpGetMonitor monitor = new SftpGetMonitor(); try { ChannelSftp channel = getSftpChannel(); return new SftpFsFileInputStream(channel.get(file, monitor), channel); } catch (SftpException e) { throw new FileBasedHelperException("Cannot download file " + file + " due to " + e.getMessage(), e); } }
class class_name[name] begin[{] method[getFileStream, return_type[type[InputStream]], modifier[public], parameter[file]] begin[{] local_variable[type[SftpGetMonitor], monitor] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSftpChannel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=channel)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ChannelSftp, sub_type=None)), ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=monitor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=channel, selectors=[], type_arguments=None), MemberReference(member=channel, 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=SftpFsFileInputStream, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot download file "), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" due to "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileBasedHelperException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SftpException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[InputStream] identifier[getFileStream] operator[SEP] identifier[String] identifier[file] operator[SEP] Keyword[throws] identifier[FileBasedHelperException] { identifier[SftpGetMonitor] identifier[monitor] operator[=] Keyword[new] identifier[SftpGetMonitor] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[ChannelSftp] identifier[channel] operator[=] identifier[getSftpChannel] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[SftpFsFileInputStream] operator[SEP] identifier[channel] operator[SEP] identifier[get] operator[SEP] identifier[file] , identifier[monitor] operator[SEP] , identifier[channel] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SftpException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[FileBasedHelperException] operator[SEP] literal[String] operator[+] identifier[file] operator[+] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public static <T> String marshal(final T data, final Class<?>... classesToBeBound) { return marshal(data, null, classesToBeBound); }
class class_name[name] begin[{] method[marshal, return_type[type[String]], modifier[public static], parameter[data, classesToBeBound]] begin[{] return[call[.marshal, parameter[member[.data], literal[null], member[.classesToBeBound]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[String] identifier[marshal] operator[SEP] Keyword[final] identifier[T] identifier[data] , Keyword[final] identifier[Class] operator[<] operator[?] operator[>] operator[...] identifier[classesToBeBound] operator[SEP] { Keyword[return] identifier[marshal] operator[SEP] identifier[data] , Other[null] , identifier[classesToBeBound] operator[SEP] operator[SEP] }
public void writeContent(final OutputStream result) throws IOException { writeRowDefinition(result); for(int i = 0; i < this.cells.size(); i++) { RtfCell rtfCell = (RtfCell) this.cells.get(i); rtfCell.writeContent(result); } result.write(DELIMITER); if(this.document.getDocumentSettings().isOutputTableRowDefinitionAfter()) { writeRowDefinition(result); } result.write(ROW_END); this.document.outputDebugLinebreak(result); }
class class_name[name] begin[{] method[writeContent, return_type[void], modifier[public], parameter[result]] begin[{] call[.writeRowDefinition, parameter[member[.result]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=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)), name=rtfCell)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RtfCell, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeContent, postfix_operators=[], prefix_operators=[], qualifier=rtfCell, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=cells, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, 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) call[result.write, parameter[member[.DELIMITER]]] if[THIS[member[None.document]call[None.getDocumentSettings, parameter[]]call[None.isOutputTableRowDefinitionAfter, parameter[]]]] begin[{] call[.writeRowDefinition, parameter[member[.result]]] else begin[{] None end[}] call[result.write, parameter[member[.ROW_END]]] THIS[member[None.document]call[None.outputDebugLinebreak, parameter[member[.result]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[writeContent] operator[SEP] Keyword[final] identifier[OutputStream] identifier[result] operator[SEP] Keyword[throws] identifier[IOException] { identifier[writeRowDefinition] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] Keyword[this] operator[SEP] identifier[cells] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[RtfCell] identifier[rtfCell] operator[=] operator[SEP] identifier[RtfCell] operator[SEP] Keyword[this] operator[SEP] identifier[cells] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[rtfCell] operator[SEP] identifier[writeContent] operator[SEP] identifier[result] operator[SEP] operator[SEP] } identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[DELIMITER] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[document] operator[SEP] identifier[getDocumentSettings] operator[SEP] operator[SEP] operator[SEP] identifier[isOutputTableRowDefinitionAfter] operator[SEP] operator[SEP] operator[SEP] { identifier[writeRowDefinition] operator[SEP] identifier[result] operator[SEP] operator[SEP] } identifier[result] operator[SEP] identifier[write] operator[SEP] identifier[ROW_END] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[document] operator[SEP] identifier[outputDebugLinebreak] operator[SEP] identifier[result] operator[SEP] operator[SEP] }
public static int convertToInt (@Nonnull final Object aSrcValue) { if (aSrcValue == null) throw new TypeConverterException (int.class, EReason.NULL_SOURCE_NOT_ALLOWED); final Integer aValue = convert (aSrcValue, Integer.class); return aValue.intValue (); }
class class_name[name] begin[{] method[convertToInt, return_type[type[int]], modifier[public static], parameter[aSrcValue]] begin[{] if[binary_operation[member[.aSrcValue], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=int)), MemberReference(member=NULL_SOURCE_NOT_ALLOWED, postfix_operators=[], prefix_operators=[], qualifier=EReason, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TypeConverterException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Integer], aValue] return[call[aValue.intValue, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[convertToInt] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Object] identifier[aSrcValue] operator[SEP] { Keyword[if] operator[SEP] identifier[aSrcValue] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[TypeConverterException] operator[SEP] Keyword[int] operator[SEP] Keyword[class] , identifier[EReason] operator[SEP] identifier[NULL_SOURCE_NOT_ALLOWED] operator[SEP] operator[SEP] Keyword[final] identifier[Integer] identifier[aValue] operator[=] identifier[convert] operator[SEP] identifier[aSrcValue] , identifier[Integer] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[return] identifier[aValue] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] }
public static List<CPAttachmentFileEntry> toModels( CPAttachmentFileEntrySoap[] soapModels) { if (soapModels == null) { return null; } List<CPAttachmentFileEntry> models = new ArrayList<CPAttachmentFileEntry>(soapModels.length); for (CPAttachmentFileEntrySoap soapModel : soapModels) { models.add(toModel(soapModel)); } return models; }
class class_name[name] begin[{] method[toModels, return_type[type[List]], modifier[public static], parameter[soapModels]] begin[{] if[binary_operation[member[.soapModels], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[List], models] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=soapModel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toModel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=models, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=soapModels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=soapModel)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CPAttachmentFileEntrySoap, sub_type=None))), label=None) return[member[.models]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CPAttachmentFileEntry] operator[>] identifier[toModels] operator[SEP] identifier[CPAttachmentFileEntrySoap] operator[SEP] operator[SEP] identifier[soapModels] operator[SEP] { Keyword[if] operator[SEP] identifier[soapModels] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[List] operator[<] identifier[CPAttachmentFileEntry] operator[>] identifier[models] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[CPAttachmentFileEntry] operator[>] operator[SEP] identifier[soapModels] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[CPAttachmentFileEntrySoap] identifier[soapModel] operator[:] identifier[soapModels] operator[SEP] { identifier[models] operator[SEP] identifier[add] operator[SEP] identifier[toModel] operator[SEP] identifier[soapModel] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[models] operator[SEP] }