code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private void setBackendSpecificOptions(CmsSimpleSearchConfigurationParser configParser, Locale locale) { configParser.setSearchLocale(locale); configParser.setIgnoreBlacklist(true); configParser.setPagination(PAGINATION); }
class class_name[name] begin[{] method[setBackendSpecificOptions, return_type[void], modifier[private], parameter[configParser, locale]] begin[{] call[configParser.setSearchLocale, parameter[member[.locale]]] call[configParser.setIgnoreBlacklist, parameter[literal[true]]] call[configParser.setPagination, parameter[member[.PAGINATION]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[setBackendSpecificOptions] operator[SEP] identifier[CmsSimpleSearchConfigurationParser] identifier[configParser] , identifier[Locale] identifier[locale] operator[SEP] { identifier[configParser] operator[SEP] identifier[setSearchLocale] operator[SEP] identifier[locale] operator[SEP] operator[SEP] identifier[configParser] operator[SEP] identifier[setIgnoreBlacklist] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[configParser] operator[SEP] identifier[setPagination] operator[SEP] identifier[PAGINATION] operator[SEP] operator[SEP] }
void chsolve2(double[][] matrix, int n, double[] y) { int i, j; double temp; /* ** solve Fb =y */ for (i = 0; i < n; i++) { temp = y[i]; for (j = 0; j < i; j++) { temp -= y[j] * matrix[i][j]; } y[i] = temp; } /* ** solve DF'z =b */ for (i = (n - 1); i >= 0; i--) { if (matrix[i][i] == 0) { y[i] = 0; } else { temp = y[i] / matrix[i][i]; for (j = i + 1; j < n; j++) { temp -= y[j] * matrix[j][i]; } y[i] = temp; } } }
class class_name[name] begin[{] method[chsolve2, return_type[void], modifier[default], parameter[matrix, n, y]] begin[{] local_variable[type[int], i] local_variable[type[double], temp] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=matrix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=temp, 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=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=matrix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=0), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=matrix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=/)), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=matrix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))], update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=y, 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=0)), 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=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))], update=[MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[void] identifier[chsolve2] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[matrix] , Keyword[int] identifier[n] , Keyword[double] operator[SEP] operator[SEP] identifier[y] operator[SEP] { Keyword[int] identifier[i] , identifier[j] operator[SEP] Keyword[double] identifier[temp] operator[SEP] Keyword[for] operator[SEP] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[temp] operator[=] identifier[y] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[i] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[temp] operator[-=] identifier[y] operator[SEP] identifier[j] operator[SEP] operator[*] identifier[matrix] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[SEP] } identifier[y] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[temp] operator[SEP] } Keyword[for] operator[SEP] identifier[i] operator[=] operator[SEP] identifier[n] operator[-] Other[1] operator[SEP] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] identifier[i] operator[--] operator[SEP] { Keyword[if] operator[SEP] identifier[matrix] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[y] operator[SEP] identifier[i] operator[SEP] operator[=] Other[0] operator[SEP] } Keyword[else] { identifier[temp] operator[=] identifier[y] operator[SEP] identifier[i] operator[SEP] operator[/] identifier[matrix] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[j] operator[=] identifier[i] operator[+] Other[1] operator[SEP] identifier[j] operator[<] identifier[n] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[temp] operator[-=] identifier[y] operator[SEP] identifier[j] operator[SEP] operator[*] identifier[matrix] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[SEP] } identifier[y] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[temp] operator[SEP] } } }
private Method analyse_method_exe(String cl_name,String exe_method) throws DevFailed { Method meth = null; try { // // Get the class object for the device class // StringBuffer str = new StringBuffer(cl_name); str.append("."); str.append(cl_name); Class cl = Class.forName(str.toString()); // // Get the device object method list // Method[] meth_list = cl.getDeclaredMethods(); if (meth_list.length == 0) { StringBuffer mess = new StringBuffer("Command "); mess.append(name); mess.append(": Can't find method "); mess.append(exe_method); Except.throw_exception("API_MethodNotFound", mess.toString(), "TemplCommandIn.analyse_method_exe()"); } // // Find the execute method in method list // meth = find_method(meth_list,exe_method); // // Check if it is public // if (Modifier.isPublic(meth.getModifiers()) != true) { StringBuffer mess = new StringBuffer("Command "); mess.append(name); mess.append(": The method "); mess.append(exe_method); mess.append(" is not public"); Except.throw_exception("API_MethodArgument", mess.toString(), "TemplCommandIn.analyse_method_exe()"); } // // Check its argument // Class[] param_type = meth.getParameterTypes(); if (param_type.length != 1) { StringBuffer mess = new StringBuffer("Command "); mess.append(name); if (param_type.length == 0) mess.append(": No argument defined for method "); else mess.append(": More than one argument defined for method "); mess.append(exe_method); Except.throw_exception("API_MethodArgument", mess.toString(), "TemplCommandIn.analyse_method_exe()"); } // // Analyse argument type // in_type = get_tango_type(param_type[0]); // // Check method return type // Class ret_type = meth.getReturnType(); if (ret_type.equals(Void.TYPE) != true) { StringBuffer mess = new StringBuffer("Command "); mess.append(name); mess.append(": Return type defined for method "); mess.append(exe_method); Except.throw_exception("API_MethodArgument", mess.toString(), "TemplCommandIn.analyse_method_exe()"); } } catch (ClassNotFoundException ex) { StringBuffer mess = new StringBuffer("Command "); mess.append(name); mess.append(": Can't find class "); mess.append(cl_name); Except.throw_exception("API_ClassNotFound", mess.toString(), "TemplCommandIn.analyse_method_exe()"); } catch (SecurityException ex) { StringBuffer mess = new StringBuffer("Command "); mess.append(name); mess.append(": Security violation when trying to retrieve method list for class "); mess.append(cl_name); Except.throw_exception("API_JavaRuntimeSecurityException", mess.toString(), "TemplCommandIn.analyse_method_exe()"); } // // Return method reference for later use // return meth; }
class class_name[name] begin[{] method[analyse_method_exe, return_type[type[Method]], modifier[private], parameter[cl_name, exe_method]] begin[{] local_variable[type[Method], meth] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=cl_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=StringBuffer, sub_type=None)), name=str)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cl_name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None)], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=cl)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDeclaredMethods, postfix_operators=[], prefix_operators=[], qualifier=cl, selectors=[], type_arguments=None), name=meth_list)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Method, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=meth_list, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Command ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=mess)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": Can't find method ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=exe_method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_MethodNotFound"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TemplCommandIn.analyse_method_exe()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=meth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=meth_list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=exe_method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=find_method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getModifiers, postfix_operators=[], prefix_operators=[], qualifier=meth, selectors=[], type_arguments=None)], member=isPublic, postfix_operators=[], prefix_operators=[], qualifier=Modifier, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Command ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=mess)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": The method ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=exe_method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is not public")], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_MethodArgument"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TemplCommandIn.analyse_method_exe()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getParameterTypes, postfix_operators=[], prefix_operators=[], qualifier=meth, selectors=[], type_arguments=None), name=param_type)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Class, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=param_type, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Command ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=mess)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=param_type, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": More than one argument defined for method ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": No argument defined for method ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=exe_method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_MethodArgument"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TemplCommandIn.analyse_method_exe()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=in_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=param_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])], member=get_tango_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getReturnType, postfix_operators=[], prefix_operators=[], qualifier=meth, selectors=[], type_arguments=None), name=ret_type)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=TYPE, postfix_operators=[], prefix_operators=[], qualifier=Void, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=ret_type, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Command ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=mess)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": Return type defined for method ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=exe_method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_MethodArgument"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TemplCommandIn.analyse_method_exe()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Command ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=mess)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": Can't find class ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cl_name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_ClassNotFound"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TemplCommandIn.analyse_method_exe()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['ClassNotFoundException'])), CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Command ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=mess)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": Security violation when trying to retrieve method list for class ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cl_name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_JavaRuntimeSecurityException"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=mess, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TemplCommandIn.analyse_method_exe()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['SecurityException']))], finally_block=None, label=None, resources=None) return[member[.meth]] end[}] END[}]
Keyword[private] identifier[Method] identifier[analyse_method_exe] operator[SEP] identifier[String] identifier[cl_name] , identifier[String] identifier[exe_method] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[Method] identifier[meth] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[StringBuffer] identifier[str] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] identifier[cl_name] operator[SEP] operator[SEP] identifier[str] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[str] operator[SEP] identifier[append] operator[SEP] identifier[cl_name] operator[SEP] operator[SEP] identifier[Class] identifier[cl] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[str] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Method] operator[SEP] operator[SEP] identifier[meth_list] operator[=] identifier[cl] operator[SEP] identifier[getDeclaredMethods] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[meth_list] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { identifier[StringBuffer] identifier[mess] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] identifier[exe_method] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[mess] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } identifier[meth] operator[=] identifier[find_method] operator[SEP] identifier[meth_list] , identifier[exe_method] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Modifier] operator[SEP] identifier[isPublic] operator[SEP] identifier[meth] operator[SEP] identifier[getModifiers] operator[SEP] operator[SEP] operator[SEP] operator[!=] literal[boolean] operator[SEP] { identifier[StringBuffer] identifier[mess] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] identifier[exe_method] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[mess] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } identifier[Class] operator[SEP] operator[SEP] identifier[param_type] operator[=] identifier[meth] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[param_type] operator[SEP] identifier[length] operator[!=] Other[1] operator[SEP] { identifier[StringBuffer] identifier[mess] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[param_type] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[else] identifier[mess] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] identifier[exe_method] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[mess] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } identifier[in_type] operator[=] identifier[get_tango_type] operator[SEP] identifier[param_type] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[Class] identifier[ret_type] operator[=] identifier[meth] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ret_type] operator[SEP] identifier[equals] operator[SEP] identifier[Void] operator[SEP] identifier[TYPE] operator[SEP] operator[!=] literal[boolean] operator[SEP] { identifier[StringBuffer] identifier[mess] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] identifier[exe_method] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[mess] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[ex] operator[SEP] { identifier[StringBuffer] identifier[mess] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] identifier[cl_name] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[mess] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SecurityException] identifier[ex] operator[SEP] { identifier[StringBuffer] identifier[mess] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mess] operator[SEP] identifier[append] operator[SEP] identifier[cl_name] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[mess] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[meth] operator[SEP] }
public static Date formatDate(Date orig, String... patterns) { String pattern = TIMESTAMP_PATTERN; if (patterns != null && patterns.length > 0 && StringUtils.isNotBlank(patterns[0])) { pattern = patterns[0]; } return parseDate(DateFormatUtils.format(orig, pattern)); }
class class_name[name] begin[{] method[formatDate, return_type[type[Date]], modifier[public static], parameter[orig, patterns]] begin[{] local_variable[type[String], pattern] if[binary_operation[binary_operation[binary_operation[member[.patterns], !=, literal[null]], &&, binary_operation[member[patterns.length], >, literal[0]]], &&, call[StringUtils.isNotBlank, parameter[member[.patterns]]]]] begin[{] assign[member[.pattern], member[.patterns]] else begin[{] None end[}] return[call[.parseDate, parameter[call[DateFormatUtils.format, parameter[member[.orig], member[.pattern]]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Date] identifier[formatDate] operator[SEP] identifier[Date] identifier[orig] , identifier[String] operator[...] identifier[patterns] operator[SEP] { identifier[String] identifier[pattern] operator[=] identifier[TIMESTAMP_PATTERN] operator[SEP] Keyword[if] operator[SEP] identifier[patterns] operator[!=] Other[null] operator[&&] identifier[patterns] operator[SEP] identifier[length] operator[>] Other[0] operator[&&] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[patterns] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] { identifier[pattern] operator[=] identifier[patterns] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[return] identifier[parseDate] operator[SEP] identifier[DateFormatUtils] operator[SEP] identifier[format] operator[SEP] identifier[orig] , identifier[pattern] operator[SEP] operator[SEP] operator[SEP] }
public static ListenableFuture<SnapshotCompletionInterest.SnapshotCompletionEvent> watchSnapshot(final String nonce) { final SettableFuture<SnapshotCompletionInterest.SnapshotCompletionEvent> result = SettableFuture.create(); SnapshotCompletionInterest interest = new SnapshotCompletionInterest() { @Override public CountDownLatch snapshotCompleted(SnapshotCompletionEvent event) { if (event.nonce.equals(nonce) && event.didSucceed) { VoltDB.instance().getSnapshotCompletionMonitor().removeInterest(this); result.set(event); } return null; } }; VoltDB.instance().getSnapshotCompletionMonitor().addInterest(interest); return result; }
class class_name[name] begin[{] method[watchSnapshot, return_type[type[ListenableFuture]], modifier[public static], parameter[nonce]] begin[{] local_variable[type[SettableFuture], result] local_variable[type[SnapshotCompletionInterest], interest] call[VoltDB.instance, parameter[]] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ListenableFuture] operator[<] identifier[SnapshotCompletionInterest] operator[SEP] identifier[SnapshotCompletionEvent] operator[>] identifier[watchSnapshot] operator[SEP] Keyword[final] identifier[String] identifier[nonce] operator[SEP] { Keyword[final] identifier[SettableFuture] operator[<] identifier[SnapshotCompletionInterest] operator[SEP] identifier[SnapshotCompletionEvent] operator[>] identifier[result] operator[=] identifier[SettableFuture] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] identifier[SnapshotCompletionInterest] identifier[interest] operator[=] Keyword[new] identifier[SnapshotCompletionInterest] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[CountDownLatch] identifier[snapshotCompleted] operator[SEP] identifier[SnapshotCompletionEvent] identifier[event] operator[SEP] { Keyword[if] operator[SEP] identifier[event] operator[SEP] identifier[nonce] operator[SEP] identifier[equals] operator[SEP] identifier[nonce] operator[SEP] operator[&&] identifier[event] operator[SEP] identifier[didSucceed] operator[SEP] { identifier[VoltDB] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator[SEP] identifier[getSnapshotCompletionMonitor] operator[SEP] operator[SEP] operator[SEP] identifier[removeInterest] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[set] operator[SEP] identifier[event] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] } } operator[SEP] identifier[VoltDB] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator[SEP] identifier[getSnapshotCompletionMonitor] operator[SEP] operator[SEP] operator[SEP] identifier[addInterest] operator[SEP] identifier[interest] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
protected final <T extends AmazonWebServiceRequest> T copyBaseTo(T target) { if (customRequestHeaders != null) { for (Map.Entry<String, String> e : customRequestHeaders.entrySet()) target.putCustomRequestHeader(e.getKey(), e.getValue()); } if (customQueryParameters != null) { for (Map.Entry<String, List<String>> e : customQueryParameters.entrySet()) { if (e.getValue() != null) { for (String value : e.getValue()) { target.putCustomQueryParameter(e.getKey(), value); } } } } target.setRequestCredentialsProvider(credentialsProvider); target.setGeneralProgressListener(progressListener); target.setRequestMetricCollector(requestMetricCollector); requestClientOptions.copyTo(target.getRequestClientOptions()); return target; }
class class_name[name] begin[{] method[copyBaseTo, return_type[type[T]], modifier[final protected], parameter[target]] begin[{] if[binary_operation[member[.customRequestHeaders], !=, literal[null]]] begin[{] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=putCustomRequestHeader, postfix_operators=[], prefix_operators=[], qualifier=target, selectors=[], type_arguments=None), label=None), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=customRequestHeaders, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) else begin[{] None end[}] if[binary_operation[member[.customQueryParameters], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=e, 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=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=putCustomQueryParameter, postfix_operators=[], prefix_operators=[], qualifier=target, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=customQueryParameters, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) else begin[{] None end[}] call[target.setRequestCredentialsProvider, parameter[member[.credentialsProvider]]] call[target.setGeneralProgressListener, parameter[member[.progressListener]]] call[target.setRequestMetricCollector, parameter[member[.requestMetricCollector]]] call[requestClientOptions.copyTo, parameter[call[target.getRequestClientOptions, parameter[]]]] return[member[.target]] end[}] END[}]
Keyword[protected] Keyword[final] operator[<] identifier[T] Keyword[extends] identifier[AmazonWebServiceRequest] operator[>] identifier[T] identifier[copyBaseTo] operator[SEP] identifier[T] identifier[target] operator[SEP] { Keyword[if] operator[SEP] identifier[customRequestHeaders] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[String] operator[>] identifier[e] operator[:] identifier[customRequestHeaders] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[target] operator[SEP] identifier[putCustomRequestHeader] operator[SEP] identifier[e] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[e] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[customQueryParameters] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[List] operator[<] identifier[String] operator[>] operator[>] identifier[e] operator[:] identifier[customQueryParameters] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[value] operator[:] identifier[e] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] { identifier[target] operator[SEP] identifier[putCustomQueryParameter] operator[SEP] identifier[e] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[value] operator[SEP] operator[SEP] } } } } identifier[target] operator[SEP] identifier[setRequestCredentialsProvider] operator[SEP] identifier[credentialsProvider] operator[SEP] operator[SEP] identifier[target] operator[SEP] identifier[setGeneralProgressListener] operator[SEP] identifier[progressListener] operator[SEP] operator[SEP] identifier[target] operator[SEP] identifier[setRequestMetricCollector] operator[SEP] identifier[requestMetricCollector] operator[SEP] operator[SEP] identifier[requestClientOptions] operator[SEP] identifier[copyTo] operator[SEP] identifier[target] operator[SEP] identifier[getRequestClientOptions] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[target] operator[SEP] }
@Override @Pure protected Rectangle2d calcBounds() { final GeoLocationPoint p = getGeoPosition(); if (p == null) { return null; } return new Rectangle2d(p.getX(), p.getY(), 0, 0); }
class class_name[name] begin[{] method[calcBounds, return_type[type[Rectangle2d]], modifier[protected], parameter[]] begin[{] local_variable[type[GeoLocationPoint], p] if[binary_operation[member[.p], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Rectangle2d, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[Pure] Keyword[protected] identifier[Rectangle2d] identifier[calcBounds] operator[SEP] operator[SEP] { Keyword[final] identifier[GeoLocationPoint] identifier[p] operator[=] identifier[getGeoPosition] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[p] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] Keyword[new] identifier[Rectangle2d] operator[SEP] identifier[p] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[p] operator[SEP] identifier[getY] operator[SEP] operator[SEP] , Other[0] , Other[0] operator[SEP] operator[SEP] }
protected double intersectionX (IRay3 ray, double x) { IVector3 origin = ray.origin(), dir = ray.direction(); double t = (x - origin.x()) / dir.x(); if (t < 0f) { return Float.MAX_VALUE; } double iy = origin.y() + t*dir.y(), iz = origin.z() + t*dir.z(); return (iy >= _minExtent.y && iy <= _maxExtent.y && iz >= _minExtent.z && iz <= _maxExtent.z) ? t : Float.MAX_VALUE; }
class class_name[name] begin[{] method[intersectionX, return_type[type[double]], modifier[protected], parameter[ray, x]] begin[{] local_variable[type[IVector3], origin] local_variable[type[double], t] if[binary_operation[member[.t], <, literal[0f]]] begin[{] return[member[Float.MAX_VALUE]] else begin[{] None end[}] local_variable[type[double], iy] return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=iy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=_minExtent, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=iy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=_maxExtent, selectors=[]), operator=<=), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=iz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=_minExtent, selectors=[]), operator=>=), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=iz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=_maxExtent, selectors=[]), operator=<=), operator=&&), if_false=MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Float, selectors=[]), if_true=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[protected] Keyword[double] identifier[intersectionX] operator[SEP] identifier[IRay3] identifier[ray] , Keyword[double] identifier[x] operator[SEP] { identifier[IVector3] identifier[origin] operator[=] identifier[ray] operator[SEP] identifier[origin] operator[SEP] operator[SEP] , identifier[dir] operator[=] identifier[ray] operator[SEP] identifier[direction] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[t] operator[=] operator[SEP] identifier[x] operator[-] identifier[origin] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] operator[/] identifier[dir] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[<] literal[Float] operator[SEP] { Keyword[return] identifier[Float] operator[SEP] identifier[MAX_VALUE] operator[SEP] } Keyword[double] identifier[iy] operator[=] identifier[origin] operator[SEP] identifier[y] operator[SEP] operator[SEP] operator[+] identifier[t] operator[*] identifier[dir] operator[SEP] identifier[y] operator[SEP] operator[SEP] , identifier[iz] operator[=] identifier[origin] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[+] identifier[t] operator[*] identifier[dir] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[iy] operator[>=] identifier[_minExtent] operator[SEP] identifier[y] operator[&&] identifier[iy] operator[<=] identifier[_maxExtent] operator[SEP] identifier[y] operator[&&] identifier[iz] operator[>=] identifier[_minExtent] operator[SEP] identifier[z] operator[&&] identifier[iz] operator[<=] identifier[_maxExtent] operator[SEP] identifier[z] operator[SEP] operator[?] identifier[t] operator[:] identifier[Float] operator[SEP] identifier[MAX_VALUE] operator[SEP] }
@Override public void visit(final Visitable visitable) { if (visitable instanceof ParameterizedInitable) { if (getParameters() != null) { ((ParameterizedInitable) visitable).init(getParameters()); } else if (getArguments() != null) { ((ParameterizedInitable) visitable).init(getArguments()); } else { ((ParameterizedInitable) visitable).init(); } } else if (visitable instanceof Initable) { ((Initable) visitable).init(); } }
class class_name[name] begin[{] method[visit, return_type[void], modifier[public], parameter[visitable]] begin[{] if[binary_operation[member[.visitable], instanceof, type[ParameterizedInitable]]] begin[{] if[binary_operation[call[.getParameters, parameter[]], !=, literal[null]]] begin[{] Cast(expression=MemberReference(member=visitable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ParameterizedInitable, sub_type=None)) else begin[{] if[binary_operation[call[.getArguments, parameter[]], !=, literal[null]]] begin[{] Cast(expression=MemberReference(member=visitable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ParameterizedInitable, sub_type=None)) else begin[{] Cast(expression=MemberReference(member=visitable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ParameterizedInitable, sub_type=None)) end[}] end[}] else begin[{] if[binary_operation[member[.visitable], instanceof, type[Initable]]] begin[{] Cast(expression=MemberReference(member=visitable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Initable, sub_type=None)) else begin[{] None end[}] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visit] operator[SEP] Keyword[final] identifier[Visitable] identifier[visitable] operator[SEP] { Keyword[if] operator[SEP] identifier[visitable] Keyword[instanceof] identifier[ParameterizedInitable] operator[SEP] { Keyword[if] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { operator[SEP] operator[SEP] identifier[ParameterizedInitable] operator[SEP] identifier[visitable] operator[SEP] operator[SEP] identifier[init] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[getArguments] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { operator[SEP] operator[SEP] identifier[ParameterizedInitable] operator[SEP] identifier[visitable] operator[SEP] operator[SEP] identifier[init] operator[SEP] identifier[getArguments] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { operator[SEP] operator[SEP] identifier[ParameterizedInitable] operator[SEP] identifier[visitable] operator[SEP] operator[SEP] identifier[init] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[visitable] Keyword[instanceof] identifier[Initable] operator[SEP] { operator[SEP] operator[SEP] identifier[Initable] operator[SEP] identifier[visitable] operator[SEP] operator[SEP] identifier[init] operator[SEP] operator[SEP] operator[SEP] } }
public final void loadFromFile(Media media) { try (FileReading reading = new FileReading(media)) { loading(reading); } catch (final IOException exception) { throw new LionEngineException(exception, media, "Error on loading from file !"); } }
class class_name[name] begin[{] method[loadFromFile, return_type[void], modifier[final public], parameter[media]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reading, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loading, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=media, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error on loading from file !")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LionEngineException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['IOException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=reading, type=ReferenceType(arguments=None, dimensions=[], name=FileReading, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=media, 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=FileReading, sub_type=None)))]) end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[loadFromFile] operator[SEP] identifier[Media] identifier[media] operator[SEP] { Keyword[try] operator[SEP] identifier[FileReading] identifier[reading] operator[=] Keyword[new] identifier[FileReading] operator[SEP] identifier[media] operator[SEP] operator[SEP] { identifier[loading] operator[SEP] identifier[reading] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[exception] operator[SEP] { Keyword[throw] Keyword[new] identifier[LionEngineException] operator[SEP] identifier[exception] , identifier[media] , literal[String] operator[SEP] operator[SEP] } }
public static ImageBuffer getRasterBuffer(ImageBuffer img, double fr, double fg, double fb) { return factoryGraphic.getRasterBuffer(img, fr, fg, fb); }
class class_name[name] begin[{] method[getRasterBuffer, return_type[type[ImageBuffer]], modifier[public static], parameter[img, fr, fg, fb]] begin[{] return[call[factoryGraphic.getRasterBuffer, parameter[member[.img], member[.fr], member[.fg], member[.fb]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ImageBuffer] identifier[getRasterBuffer] operator[SEP] identifier[ImageBuffer] identifier[img] , Keyword[double] identifier[fr] , Keyword[double] identifier[fg] , Keyword[double] identifier[fb] operator[SEP] { Keyword[return] identifier[factoryGraphic] operator[SEP] identifier[getRasterBuffer] operator[SEP] identifier[img] , identifier[fr] , identifier[fg] , identifier[fb] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public static final List<Map<String, Object>> getDocuments(Map<String, Object> result) { if (MapUtils.isNotEmpty(result) && result.containsKey(RESPONSE_KEY)) { Map<String, Object> response = (Map<String, Object>)result.get(RESPONSE_KEY); if (MapUtils.isNotEmpty(response) && response.containsKey(DOCUMENTS_KEY)) { return (List<Map<String, Object>>)response.get(DOCUMENTS_KEY); } } return null; }
class class_name[name] begin[{] method[getDocuments, return_type[type[List]], modifier[final public static], parameter[result]] begin[{] if[binary_operation[call[MapUtils.isNotEmpty, parameter[member[.result]]], &&, call[result.containsKey, parameter[member[.RESPONSE_KEY]]]]] begin[{] local_variable[type[Map], response] if[binary_operation[call[MapUtils.isNotEmpty, parameter[member[.response]]], &&, call[response.containsKey, parameter[member[.DOCUMENTS_KEY]]]]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=DOCUMENTS_KEY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, 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))], dimensions=[], name=List, sub_type=None))] else begin[{] None end[}] else begin[{] None end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[final] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] identifier[getDocuments] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[result] operator[SEP] { Keyword[if] operator[SEP] identifier[MapUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[result] operator[SEP] operator[&&] identifier[result] operator[SEP] identifier[containsKey] operator[SEP] identifier[RESPONSE_KEY] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[response] operator[=] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] identifier[result] operator[SEP] identifier[get] operator[SEP] identifier[RESPONSE_KEY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[MapUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[response] operator[SEP] operator[&&] identifier[response] operator[SEP] identifier[containsKey] operator[SEP] identifier[DOCUMENTS_KEY] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] operator[SEP] identifier[response] operator[SEP] identifier[get] operator[SEP] identifier[DOCUMENTS_KEY] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public ErrorsComponent addError() { //3 ErrorsComponent t = new ErrorsComponent(); if (this.error == null) this.error = new ArrayList<ErrorsComponent>(); this.error.add(t); return t; }
class class_name[name] begin[{] method[addError, return_type[type[ErrorsComponent]], modifier[public], parameter[]] begin[{] local_variable[type[ErrorsComponent], t] if[binary_operation[THIS[member[None.error]], ==, literal[null]]] begin[{] assign[THIS[member[None.error]], 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=ErrorsComponent, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] else begin[{] None end[}] THIS[member[None.error]call[None.add, parameter[member[.t]]]] return[member[.t]] end[}] END[}]
Keyword[public] identifier[ErrorsComponent] identifier[addError] operator[SEP] operator[SEP] { identifier[ErrorsComponent] identifier[t] operator[=] Keyword[new] identifier[ErrorsComponent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[error] operator[==] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[error] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[ErrorsComponent] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[error] operator[SEP] identifier[add] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[return] identifier[t] operator[SEP] }
public static String encodeUrlSafeBase64(String value) { return new String(UrlSafeBase64.encode(value.getBytes(Charsets.UTF_8))); }
class class_name[name] begin[{] method[encodeUrlSafeBase64, return_type[type[String]], modifier[public static], parameter[value]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=UTF_8, postfix_operators=[], prefix_operators=[], qualifier=Charsets, selectors=[])], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None)], member=encode, postfix_operators=[], prefix_operators=[], qualifier=UrlSafeBase64, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[encodeUrlSafeBase64] operator[SEP] identifier[String] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[String] operator[SEP] identifier[UrlSafeBase64] operator[SEP] identifier[encode] operator[SEP] identifier[value] operator[SEP] identifier[getBytes] operator[SEP] identifier[Charsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void emitFolded(int width, int keep_nl, Pointer _str, int len) { byte[] bstr = _str.buffer; int str = _str.start; int mark = str; int start = str; int end = str; write(GT, 1); if(keep_nl == YAML.NL_CHOMP) { write(MINUS, 1); } else if(keep_nl == YAML.NL_KEEP) { write(PLUS, 1); } emitIndent(); if(width <= 0) width = this.best_width; while(mark < str + len) { switch(bstr[mark]) { case '\n': write(_str.withStart(end), mark - end ); end = mark + 1; if(bstr[start] != ' ' && bstr[start] != '\n' && bstr[end] != '\n' && bstr[end] != ' ' ) { write(NEWLINE, 1); } if(mark + 1 == str + len) { if(keep_nl != YAML.NL_KEEP) write(NEWLINE, 1); } else { emitIndent(); } start = mark + 1; break; case ' ': if(bstr[start] != ' ') { if(mark - end > width) { write(_str.withStart(end), mark - end ); emitIndent(); end = mark + 1; } } break; } mark++; } if(end < mark) { write(_str.withStart(end), mark - end); } }
class class_name[name] begin[{] method[emitFolded, return_type[void], modifier[public], parameter[width, keep_nl, _str, len]] begin[{] local_variable[type[byte], bstr] local_variable[type[int], str] local_variable[type[int], mark] local_variable[type[int], start] local_variable[type[int], end] call[.write, parameter[member[.GT], literal[1]]] if[binary_operation[member[.keep_nl], ==, member[YAML.NL_CHOMP]]] begin[{] call[.write, parameter[member[.MINUS], literal[1]]] else begin[{] if[binary_operation[member[.keep_nl], ==, member[YAML.NL_KEEP]]] begin[{] call[.write, parameter[member[.PLUS], literal[1]]] else begin[{] None end[}] end[}] call[.emitIndent, parameter[]] if[binary_operation[member[.width], <=, literal[0]]] begin[{] assign[member[.width], THIS[member[None.best_width]]] else begin[{] None end[}] while[binary_operation[member[.mark], <, binary_operation[member[.str], +, member[.len]]]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\n')], statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withStart, postfix_operators=[], prefix_operators=[], qualifier=_str, selectors=[], type_arguments=None), BinaryOperation(operandl=MemberReference(member=mark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=write, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=mark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=bstr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=bstr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\n'), operator=!=), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=bstr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\n'), operator=!=), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=bstr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=NEWLINE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=write, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=mark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=BinaryOperation(operandl=MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=emitIndent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=keep_nl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=NL_KEEP, postfix_operators=[], prefix_operators=[], qualifier=YAML, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=NEWLINE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=write, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=mark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' ')], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=bstr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=mark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withStart, postfix_operators=[], prefix_operators=[], qualifier=_str, selectors=[], type_arguments=None), BinaryOperation(operandl=MemberReference(member=mark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=write, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=emitIndent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=mark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None)]))])), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=bstr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=mark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), label=None) member[.mark] end[}] if[binary_operation[member[.end], <, member[.mark]]] begin[{] call[.write, parameter[call[_str.withStart, parameter[member[.end]]], binary_operation[member[.mark], -, member[.end]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[emitFolded] operator[SEP] Keyword[int] identifier[width] , Keyword[int] identifier[keep_nl] , identifier[Pointer] identifier[_str] , Keyword[int] identifier[len] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[bstr] operator[=] identifier[_str] operator[SEP] identifier[buffer] operator[SEP] Keyword[int] identifier[str] operator[=] identifier[_str] operator[SEP] identifier[start] operator[SEP] Keyword[int] identifier[mark] operator[=] identifier[str] operator[SEP] Keyword[int] identifier[start] operator[=] identifier[str] operator[SEP] Keyword[int] identifier[end] operator[=] identifier[str] operator[SEP] identifier[write] operator[SEP] identifier[GT] , Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[keep_nl] operator[==] identifier[YAML] operator[SEP] identifier[NL_CHOMP] operator[SEP] { identifier[write] operator[SEP] identifier[MINUS] , Other[1] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[keep_nl] operator[==] identifier[YAML] operator[SEP] identifier[NL_KEEP] operator[SEP] { identifier[write] operator[SEP] identifier[PLUS] , Other[1] operator[SEP] operator[SEP] } identifier[emitIndent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[width] operator[<=] Other[0] operator[SEP] identifier[width] operator[=] Keyword[this] operator[SEP] identifier[best_width] operator[SEP] Keyword[while] operator[SEP] identifier[mark] operator[<] identifier[str] operator[+] identifier[len] operator[SEP] { Keyword[switch] operator[SEP] identifier[bstr] operator[SEP] identifier[mark] operator[SEP] operator[SEP] { Keyword[case] literal[String] operator[:] identifier[write] operator[SEP] identifier[_str] operator[SEP] identifier[withStart] operator[SEP] identifier[end] operator[SEP] , identifier[mark] operator[-] identifier[end] operator[SEP] operator[SEP] identifier[end] operator[=] identifier[mark] operator[+] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[bstr] operator[SEP] identifier[start] operator[SEP] operator[!=] literal[String] operator[&&] identifier[bstr] operator[SEP] identifier[start] operator[SEP] operator[!=] literal[String] operator[&&] identifier[bstr] operator[SEP] identifier[end] operator[SEP] operator[!=] literal[String] operator[&&] identifier[bstr] operator[SEP] identifier[end] operator[SEP] operator[!=] literal[String] operator[SEP] { identifier[write] operator[SEP] identifier[NEWLINE] , Other[1] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[mark] operator[+] Other[1] operator[==] identifier[str] operator[+] identifier[len] operator[SEP] { Keyword[if] operator[SEP] identifier[keep_nl] operator[!=] identifier[YAML] operator[SEP] identifier[NL_KEEP] operator[SEP] identifier[write] operator[SEP] identifier[NEWLINE] , Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[emitIndent] operator[SEP] operator[SEP] operator[SEP] } identifier[start] operator[=] identifier[mark] operator[+] Other[1] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] Keyword[if] operator[SEP] identifier[bstr] operator[SEP] identifier[start] operator[SEP] operator[!=] literal[String] operator[SEP] { Keyword[if] operator[SEP] identifier[mark] operator[-] identifier[end] operator[>] identifier[width] operator[SEP] { identifier[write] operator[SEP] identifier[_str] operator[SEP] identifier[withStart] operator[SEP] identifier[end] operator[SEP] , identifier[mark] operator[-] identifier[end] operator[SEP] operator[SEP] identifier[emitIndent] operator[SEP] operator[SEP] operator[SEP] identifier[end] operator[=] identifier[mark] operator[+] Other[1] operator[SEP] } } Keyword[break] operator[SEP] } identifier[mark] operator[++] operator[SEP] } Keyword[if] operator[SEP] identifier[end] operator[<] identifier[mark] operator[SEP] { identifier[write] operator[SEP] identifier[_str] operator[SEP] identifier[withStart] operator[SEP] identifier[end] operator[SEP] , identifier[mark] operator[-] identifier[end] operator[SEP] operator[SEP] } }
@Subscribe @SneakyThrows public final synchronized void renew(final ShardingRuleChangedEvent shardingRuleChangedEvent) { dataSource = new ShardingDataSource(dataSource.getDataSourceMap(), new OrchestrationShardingRule(shardingRuleChangedEvent.getShardingRuleConfiguration(), dataSource.getDataSourceMap().keySet()), dataSource.getShardingContext().getShardingProperties().getProps()); }
class class_name[name] begin[{] method[renew, return_type[void], modifier[synchronized final public], parameter[shardingRuleChangedEvent]] begin[{] assign[member[.dataSource], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getDataSourceMap, postfix_operators=[], prefix_operators=[], qualifier=dataSource, selectors=[], type_arguments=None), ClassCreator(arguments=[MethodInvocation(arguments=[], member=getShardingRuleConfiguration, postfix_operators=[], prefix_operators=[], qualifier=shardingRuleChangedEvent, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getDataSourceMap, postfix_operators=[], prefix_operators=[], qualifier=dataSource, selectors=[MethodInvocation(arguments=[], member=keySet, 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=OrchestrationShardingRule, sub_type=None)), MethodInvocation(arguments=[], member=getShardingContext, postfix_operators=[], prefix_operators=[], qualifier=dataSource, selectors=[MethodInvocation(arguments=[], member=getShardingProperties, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getProps, 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=ShardingDataSource, sub_type=None))] end[}] END[}]
annotation[@] identifier[Subscribe] annotation[@] identifier[SneakyThrows] Keyword[public] Keyword[final] Keyword[synchronized] Keyword[void] identifier[renew] operator[SEP] Keyword[final] identifier[ShardingRuleChangedEvent] identifier[shardingRuleChangedEvent] operator[SEP] { identifier[dataSource] operator[=] Keyword[new] identifier[ShardingDataSource] operator[SEP] identifier[dataSource] operator[SEP] identifier[getDataSourceMap] operator[SEP] operator[SEP] , Keyword[new] identifier[OrchestrationShardingRule] operator[SEP] identifier[shardingRuleChangedEvent] operator[SEP] identifier[getShardingRuleConfiguration] operator[SEP] operator[SEP] , identifier[dataSource] operator[SEP] identifier[getDataSourceMap] operator[SEP] operator[SEP] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] , identifier[dataSource] operator[SEP] identifier[getShardingContext] operator[SEP] operator[SEP] operator[SEP] identifier[getShardingProperties] operator[SEP] operator[SEP] operator[SEP] identifier[getProps] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public EClass getIfcGeometricSet() { if (ifcGeometricSetEClass == null) { ifcGeometricSetEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(306); } return ifcGeometricSetEClass; }
class class_name[name] begin[{] method[getIfcGeometricSet, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcGeometricSetEClass], ==, literal[null]]] begin[{] assign[member[.ifcGeometricSetEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=306)], 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[.ifcGeometricSetEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcGeometricSet] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcGeometricSetEClass] operator[==] Other[null] operator[SEP] { identifier[ifcGeometricSetEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[306] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcGeometricSetEClass] operator[SEP] }
public void putObject(String bucketName, String objectName, ServerSideEncryption sse, String fileName) throws InvalidBucketNameException, NoSuchAlgorithmException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException, InvalidArgumentException, InsufficientDataException { if (sse.getType() == ServerSideEncryption.Type.SSE_C && !this.baseUrl.isHttps()) { throw new InvalidArgumentException("SSE_C operations must be performed over a secure connection."); } else if (sse.getType() == ServerSideEncryption.Type.SSE_KMS && !this.baseUrl.isHttps()) { throw new InvalidArgumentException("SSE_KMS operations must be performed over a secure connection."); } if (fileName == null || "".equals(fileName)) { throw new InvalidArgumentException("empty file name is not allowed"); } Path filePath = Paths.get(fileName); if (!Files.isRegularFile(filePath)) { throw new InvalidArgumentException("'" + fileName + "': not a regular file"); } String contentType = Files.probeContentType(filePath); long size = Files.size(filePath); RandomAccessFile file = new RandomAccessFile(filePath.toFile(), "r"); // Set the contentType Map<String, String> headerMap = new HashMap<>(); headerMap.put("Content-Type", contentType); try { putObject(bucketName, objectName, size, file, headerMap, sse); } finally { file.close(); } }
class class_name[name] begin[{] method[putObject, return_type[void], modifier[public], parameter[bucketName, objectName, sse, fileName]] begin[{] if[binary_operation[binary_operation[call[sse.getType, parameter[]], ==, member[ServerSideEncryption.Type.SSE_C]], &&, THIS[member[None.baseUrl]call[None.isHttps, parameter[]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SSE_C operations must be performed over a secure connection.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidArgumentException, sub_type=None)), label=None) else begin[{] if[binary_operation[binary_operation[call[sse.getType, parameter[]], ==, member[ServerSideEncryption.Type.SSE_KMS]], &&, THIS[member[None.baseUrl]call[None.isHttps, parameter[]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SSE_KMS operations must be performed over a secure connection.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidArgumentException, sub_type=None)), label=None) else begin[{] None end[}] end[}] if[binary_operation[binary_operation[member[.fileName], ==, literal[null]], ||, literal[""]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="empty file name is not allowed")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Path], filePath] if[call[Files.isRegularFile, parameter[member[.filePath]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operandr=MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="': not a regular file"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], contentType] local_variable[type[long], size] local_variable[type[RandomAccessFile], file] local_variable[type[Map], headerMap] call[headerMap.put, parameter[literal["Content-Type"], member[.contentType]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bucketName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=objectName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=headerMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=putObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[putObject] operator[SEP] identifier[String] identifier[bucketName] , identifier[String] identifier[objectName] , identifier[ServerSideEncryption] identifier[sse] , identifier[String] identifier[fileName] operator[SEP] Keyword[throws] identifier[InvalidBucketNameException] , identifier[NoSuchAlgorithmException] , identifier[IOException] , identifier[InvalidKeyException] , identifier[NoResponseException] , identifier[XmlPullParserException] , identifier[ErrorResponseException] , identifier[InternalException] , identifier[InvalidArgumentException] , identifier[InsufficientDataException] { Keyword[if] operator[SEP] identifier[sse] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[ServerSideEncryption] operator[SEP] identifier[Type] operator[SEP] identifier[SSE_C] operator[&&] operator[!] Keyword[this] operator[SEP] identifier[baseUrl] operator[SEP] identifier[isHttps] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[sse] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[ServerSideEncryption] operator[SEP] identifier[Type] operator[SEP] identifier[SSE_KMS] operator[&&] operator[!] Keyword[this] operator[SEP] identifier[baseUrl] operator[SEP] identifier[isHttps] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[fileName] operator[==] Other[null] operator[||] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[fileName] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Path] identifier[filePath] operator[=] identifier[Paths] operator[SEP] identifier[get] operator[SEP] identifier[fileName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Files] operator[SEP] identifier[isRegularFile] operator[SEP] identifier[filePath] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidArgumentException] operator[SEP] literal[String] operator[+] identifier[fileName] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[contentType] operator[=] identifier[Files] operator[SEP] identifier[probeContentType] operator[SEP] identifier[filePath] operator[SEP] operator[SEP] Keyword[long] identifier[size] operator[=] identifier[Files] operator[SEP] identifier[size] operator[SEP] identifier[filePath] operator[SEP] operator[SEP] identifier[RandomAccessFile] identifier[file] operator[=] Keyword[new] identifier[RandomAccessFile] operator[SEP] identifier[filePath] operator[SEP] identifier[toFile] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[headerMap] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[headerMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[contentType] operator[SEP] operator[SEP] Keyword[try] { identifier[putObject] operator[SEP] identifier[bucketName] , identifier[objectName] , identifier[size] , identifier[file] , identifier[headerMap] , identifier[sse] operator[SEP] operator[SEP] } Keyword[finally] { identifier[file] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } }
private void addResourceToModule(String resourcePath, CmsModule module) { List<String> currentRessources = Lists.newArrayList(module.getResources()); for (String resource : currentRessources) { if (resourcePath.startsWith(resource)) { return; } } currentRessources.add(resourcePath); module.setResources(currentRessources); }
class class_name[name] begin[{] method[addResourceToModule, return_type[void], modifier[private], parameter[resourcePath, module]] begin[{] local_variable[type[List], currentRessources] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=resourcePath, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=currentRessources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=resource)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[currentRessources.add, parameter[member[.resourcePath]]] call[module.setResources, parameter[member[.currentRessources]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[addResourceToModule] operator[SEP] identifier[String] identifier[resourcePath] , identifier[CmsModule] identifier[module] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[currentRessources] operator[=] identifier[Lists] operator[SEP] identifier[newArrayList] operator[SEP] identifier[module] operator[SEP] identifier[getResources] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[resource] operator[:] identifier[currentRessources] operator[SEP] { Keyword[if] operator[SEP] identifier[resourcePath] operator[SEP] identifier[startsWith] operator[SEP] identifier[resource] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } } identifier[currentRessources] operator[SEP] identifier[add] operator[SEP] identifier[resourcePath] operator[SEP] operator[SEP] identifier[module] operator[SEP] identifier[setResources] operator[SEP] identifier[currentRessources] operator[SEP] operator[SEP] }
static void writeInfo(String parent, HdfsFileStatus i, XMLOutputter doc) throws IOException { final SimpleDateFormat ldf = df.get(); doc.startTag(i.isDir() ? "directory" : "file"); doc.attribute("path", i.getFullPath(new Path(parent)).toUri().getPath()); doc.attribute("modified", ldf.format(new Date(i.getModificationTime()))); doc.attribute("accesstime", ldf.format(new Date(i.getAccessTime()))); if (!i.isDir()) { doc.attribute("size", String.valueOf(i.getLen())); doc.attribute("replication", String.valueOf(i.getReplication())); doc.attribute("blocksize", String.valueOf(i.getBlockSize())); } doc.attribute("permission", (i.isDir()? "d": "-") + i.getPermission()); doc.attribute("owner", i.getOwner()); doc.attribute("group", i.getGroup()); doc.endTag(); }
class class_name[name] begin[{] method[writeInfo, return_type[void], modifier[static], parameter[parent, i, doc]] begin[{] local_variable[type[SimpleDateFormat], ldf] call[doc.startTag, parameter[TernaryExpression(condition=MethodInvocation(arguments=[], member=isDir, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="file"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="directory"))]] call[doc.attribute, parameter[literal["path"], call[i.getFullPath, parameter[ClassCreator(arguments=[MemberReference(member=parent, 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=Path, sub_type=None))]]]] call[doc.attribute, parameter[literal["modified"], call[ldf.format, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getModificationTime, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))]]]] call[doc.attribute, parameter[literal["accesstime"], call[ldf.format, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getAccessTime, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))]]]] if[call[i.isDir, parameter[]]] begin[{] call[doc.attribute, parameter[literal["size"], call[String.valueOf, parameter[call[i.getLen, parameter[]]]]]] call[doc.attribute, parameter[literal["replication"], call[String.valueOf, parameter[call[i.getReplication, parameter[]]]]]] call[doc.attribute, parameter[literal["blocksize"], call[String.valueOf, parameter[call[i.getBlockSize, parameter[]]]]]] else begin[{] None end[}] call[doc.attribute, parameter[literal["permission"], binary_operation[TernaryExpression(condition=MethodInvocation(arguments=[], member=isDir, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="-"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="d")), +, call[i.getPermission, parameter[]]]]] call[doc.attribute, parameter[literal["owner"], call[i.getOwner, parameter[]]]] call[doc.attribute, parameter[literal["group"], call[i.getGroup, parameter[]]]] call[doc.endTag, parameter[]] end[}] END[}]
Keyword[static] Keyword[void] identifier[writeInfo] operator[SEP] identifier[String] identifier[parent] , identifier[HdfsFileStatus] identifier[i] , identifier[XMLOutputter] identifier[doc] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[SimpleDateFormat] identifier[ldf] operator[=] identifier[df] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[doc] operator[SEP] identifier[startTag] operator[SEP] identifier[i] operator[SEP] identifier[isDir] operator[SEP] operator[SEP] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] identifier[doc] operator[SEP] identifier[attribute] operator[SEP] literal[String] , identifier[i] operator[SEP] identifier[getFullPath] operator[SEP] Keyword[new] identifier[Path] operator[SEP] identifier[parent] operator[SEP] operator[SEP] operator[SEP] identifier[toUri] operator[SEP] operator[SEP] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[doc] operator[SEP] identifier[attribute] operator[SEP] literal[String] , identifier[ldf] operator[SEP] identifier[format] operator[SEP] Keyword[new] identifier[Date] operator[SEP] identifier[i] operator[SEP] identifier[getModificationTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[doc] operator[SEP] identifier[attribute] operator[SEP] literal[String] , identifier[ldf] operator[SEP] identifier[format] operator[SEP] Keyword[new] identifier[Date] operator[SEP] identifier[i] operator[SEP] identifier[getAccessTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[i] operator[SEP] identifier[isDir] operator[SEP] operator[SEP] operator[SEP] { identifier[doc] operator[SEP] identifier[attribute] operator[SEP] literal[String] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[i] operator[SEP] identifier[getLen] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[doc] operator[SEP] identifier[attribute] operator[SEP] literal[String] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[i] operator[SEP] identifier[getReplication] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[doc] operator[SEP] identifier[attribute] operator[SEP] literal[String] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[i] operator[SEP] identifier[getBlockSize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[doc] operator[SEP] identifier[attribute] operator[SEP] literal[String] , operator[SEP] identifier[i] operator[SEP] identifier[isDir] operator[SEP] operator[SEP] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[+] identifier[i] operator[SEP] identifier[getPermission] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[doc] operator[SEP] identifier[attribute] operator[SEP] literal[String] , identifier[i] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[doc] operator[SEP] identifier[attribute] operator[SEP] literal[String] , identifier[i] operator[SEP] identifier[getGroup] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[doc] operator[SEP] identifier[endTag] operator[SEP] operator[SEP] operator[SEP] }
public ClassScanner includeJars(final String... includedJars) { for (final String includedJar : includedJars) { rulesJars.include(includedJar); } return this; }
class class_name[name] begin[{] method[includeJars, return_type[type[ClassScanner]], modifier[public], parameter[includedJars]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=includedJar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=include, postfix_operators=[], prefix_operators=[], qualifier=rulesJars, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=includedJars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=includedJar)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[ClassScanner] identifier[includeJars] operator[SEP] Keyword[final] identifier[String] operator[...] identifier[includedJars] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[includedJar] operator[:] identifier[includedJars] operator[SEP] { identifier[rulesJars] operator[SEP] identifier[include] operator[SEP] identifier[includedJar] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
static String escapeText(final String input) { return escapeBytes(ByteBuffer.wrap(input.getBytes(ISO_8859_1))).toString(); }
class class_name[name] begin[{] method[escapeText, return_type[type[String]], modifier[static], parameter[input]] begin[{] return[call[.escapeBytes, parameter[call[ByteBuffer.wrap, parameter[call[input.getBytes, parameter[member[.ISO_8859_1]]]]]]]] end[}] END[}]
Keyword[static] identifier[String] identifier[escapeText] operator[SEP] Keyword[final] identifier[String] identifier[input] operator[SEP] { Keyword[return] identifier[escapeBytes] operator[SEP] identifier[ByteBuffer] operator[SEP] identifier[wrap] operator[SEP] identifier[input] operator[SEP] identifier[getBytes] operator[SEP] identifier[ISO_8859_1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static boolean deletePubkeysListNode(PepManager pepManager) throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException { PubSubManager pm = pepManager.getPepPubSubManager(); return pm.deleteNode(PEP_NODE_PUBLIC_KEYS); }
class class_name[name] begin[{] method[deletePubkeysListNode, return_type[type[boolean]], modifier[public static], parameter[pepManager]] begin[{] local_variable[type[PubSubManager], pm] return[call[pm.deleteNode, parameter[member[.PEP_NODE_PUBLIC_KEYS]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[deletePubkeysListNode] operator[SEP] identifier[PepManager] identifier[pepManager] operator[SEP] Keyword[throws] identifier[XMPPException] operator[SEP] identifier[XMPPErrorException] , identifier[SmackException] operator[SEP] identifier[NotConnectedException] , identifier[InterruptedException] , identifier[SmackException] operator[SEP] identifier[NoResponseException] { identifier[PubSubManager] identifier[pm] operator[=] identifier[pepManager] operator[SEP] identifier[getPepPubSubManager] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[pm] operator[SEP] identifier[deleteNode] operator[SEP] identifier[PEP_NODE_PUBLIC_KEYS] operator[SEP] operator[SEP] }
public static Feed generateFeed(String request, String matcherDetails, Map<URI, MatchResult> matchingResults) { Feed feed = initialiseFeed(request, matcherDetails); // Return empty feed if null if (matchingResults == null) { return feed; } int numResults = matchingResults.size(); log.debug(matchingResults.keySet().toString()); Set<Map.Entry<URI, MatchResult>> entries = matchingResults.entrySet(); for (Map.Entry<URI, MatchResult> entry : entries) { Entry rssEntry = createMatchResultEntry(entry.getKey(), entry.getValue()); feed.addEntry(rssEntry); } return feed; }
class class_name[name] begin[{] method[generateFeed, return_type[type[Feed]], modifier[public static], parameter[request, matcherDetails, matchingResults]] begin[{] local_variable[type[Feed], feed] if[binary_operation[member[.matchingResults], ==, literal[null]]] begin[{] return[member[.feed]] else begin[{] None end[}] local_variable[type[int], numResults] call[log.debug, parameter[call[matchingResults.keySet, parameter[]]]] local_variable[type[Set], entries] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=createMatchResultEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=rssEntry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Entry, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=rssEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addEntry, postfix_operators=[], prefix_operators=[], qualifier=feed, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=entries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MatchResult, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) return[member[.feed]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Feed] identifier[generateFeed] operator[SEP] identifier[String] identifier[request] , identifier[String] identifier[matcherDetails] , identifier[Map] operator[<] identifier[URI] , identifier[MatchResult] operator[>] identifier[matchingResults] operator[SEP] { identifier[Feed] identifier[feed] operator[=] identifier[initialiseFeed] operator[SEP] identifier[request] , identifier[matcherDetails] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matchingResults] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[feed] operator[SEP] } Keyword[int] identifier[numResults] operator[=] identifier[matchingResults] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] identifier[matchingResults] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[URI] , identifier[MatchResult] operator[>] operator[>] identifier[entries] operator[=] identifier[matchingResults] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[URI] , identifier[MatchResult] operator[>] identifier[entry] operator[:] identifier[entries] operator[SEP] { identifier[Entry] identifier[rssEntry] operator[=] identifier[createMatchResultEntry] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[feed] operator[SEP] identifier[addEntry] operator[SEP] identifier[rssEntry] operator[SEP] operator[SEP] } Keyword[return] identifier[feed] operator[SEP] }
public static Object getFieldValue(final Object obj, final String fieldName) { Field field = getAccessibleField(obj, fieldName); if (field == null) { throw new IllegalArgumentException("Could not find field [" + fieldName + "] on target [" + obj + "]"); } Object result = null; try { result = field.get(obj); } catch (IllegalAccessException e) { logger.error("不可能抛出的异常{}", e.getMessage()); } return result; }
class class_name[name] begin[{] method[getFieldValue, return_type[type[Object]], modifier[public static], parameter[obj, fieldName]] begin[{] local_variable[type[Field], field] if[binary_operation[member[.field], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not find field ["), operandr=MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] on target ["), operator=+), operandr=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Object], result] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="不可能抛出的异常{}"), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException']))], finally_block=None, label=None, resources=None) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[getFieldValue] operator[SEP] Keyword[final] identifier[Object] identifier[obj] , Keyword[final] identifier[String] identifier[fieldName] operator[SEP] { identifier[Field] identifier[field] operator[=] identifier[getAccessibleField] operator[SEP] identifier[obj] , identifier[fieldName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[field] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[fieldName] operator[+] literal[String] operator[+] identifier[obj] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[Object] identifier[result] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[result] operator[=] identifier[field] operator[SEP] identifier[get] operator[SEP] identifier[obj] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
protected void postConnection(ConnectionHandle handle, long statsObtainTime){ handle.renewConnection(); // mark it as being logically "open" // Give an application a chance to do something with it. if (handle.getConnectionHook() != null){ handle.getConnectionHook().onCheckOut(handle); } if (this.pool.closeConnectionWatch){ // a debugging tool this.pool.watchConnection(handle); } if (this.pool.statisticsEnabled){ this.pool.statistics.addCumulativeConnectionWaitTime(System.nanoTime()-statsObtainTime); } }
class class_name[name] begin[{] method[postConnection, return_type[void], modifier[protected], parameter[handle, statsObtainTime]] begin[{] call[handle.renewConnection, parameter[]] if[binary_operation[call[handle.getConnectionHook, parameter[]], !=, literal[null]]] begin[{] call[handle.getConnectionHook, parameter[]] else begin[{] None end[}] if[THIS[member[None.pool]member[None.closeConnectionWatch]]] begin[{] THIS[member[None.pool]call[None.watchConnection, parameter[member[.handle]]]] else begin[{] None end[}] if[THIS[member[None.pool]member[None.statisticsEnabled]]] begin[{] THIS[member[None.pool]member[None.statistics]call[None.addCumulativeConnectionWaitTime, parameter[binary_operation[call[System.nanoTime, parameter[]], -, member[.statsObtainTime]]]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[postConnection] operator[SEP] identifier[ConnectionHandle] identifier[handle] , Keyword[long] identifier[statsObtainTime] operator[SEP] { identifier[handle] operator[SEP] identifier[renewConnection] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[handle] operator[SEP] identifier[getConnectionHook] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[handle] operator[SEP] identifier[getConnectionHook] operator[SEP] operator[SEP] operator[SEP] identifier[onCheckOut] operator[SEP] identifier[handle] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[pool] operator[SEP] identifier[closeConnectionWatch] operator[SEP] { Keyword[this] operator[SEP] identifier[pool] operator[SEP] identifier[watchConnection] operator[SEP] identifier[handle] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[pool] operator[SEP] identifier[statisticsEnabled] operator[SEP] { Keyword[this] operator[SEP] identifier[pool] operator[SEP] identifier[statistics] operator[SEP] identifier[addCumulativeConnectionWaitTime] operator[SEP] identifier[System] operator[SEP] identifier[nanoTime] operator[SEP] operator[SEP] operator[-] identifier[statsObtainTime] operator[SEP] operator[SEP] } }
Version readVersion() throws FormatException { if (parsedVersion != null) { return parsedVersion; } int dimension = bitMatrix.getHeight(); int provisionalVersion = (dimension - 17) / 4; if (provisionalVersion <= 6) { return Version.getVersionForNumber(provisionalVersion); } // Read top-right version info: 3 wide by 6 tall int versionBits = 0; int ijMin = dimension - 11; for (int j = 5; j >= 0; j--) { for (int i = dimension - 9; i >= ijMin; i--) { versionBits = copyBit(i, j, versionBits); } } Version theParsedVersion = Version.decodeVersionInformation(versionBits); if (theParsedVersion != null && theParsedVersion.getDimensionForVersion() == dimension) { parsedVersion = theParsedVersion; return theParsedVersion; } // Hmm, failed. Try bottom left: 6 wide by 3 tall versionBits = 0; for (int i = 5; i >= 0; i--) { for (int j = dimension - 9; j >= ijMin; j--) { versionBits = copyBit(i, j, versionBits); } } theParsedVersion = Version.decodeVersionInformation(versionBits); if (theParsedVersion != null && theParsedVersion.getDimensionForVersion() == dimension) { parsedVersion = theParsedVersion; return theParsedVersion; } throw FormatException.getFormatInstance(); }
class class_name[name] begin[{] method[readVersion, return_type[type[Version]], modifier[default], parameter[]] begin[{] if[binary_operation[member[.parsedVersion], !=, literal[null]]] begin[{] return[member[.parsedVersion]] else begin[{] None end[}] local_variable[type[int], dimension] local_variable[type[int], provisionalVersion] if[binary_operation[member[.provisionalVersion], <=, literal[6]]] begin[{] return[call[Version.getVersionForNumber, parameter[member[.provisionalVersion]]]] else begin[{] None end[}] local_variable[type[int], versionBits] local_variable[type[int], ijMin] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=versionBits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=versionBits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copyBit, 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=ijMin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=dimension, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=9), operator=-), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) local_variable[type[Version], theParsedVersion] if[binary_operation[binary_operation[member[.theParsedVersion], !=, literal[null]], &&, binary_operation[call[theParsedVersion.getDimensionForVersion, parameter[]], ==, member[.dimension]]]] begin[{] assign[member[.parsedVersion], member[.theParsedVersion]] return[member[.theParsedVersion]] else begin[{] None end[}] assign[member[.versionBits], literal[0]] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=versionBits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=versionBits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copyBit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ijMin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=dimension, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=9), 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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.theParsedVersion], call[Version.decodeVersionInformation, parameter[member[.versionBits]]]] if[binary_operation[binary_operation[member[.theParsedVersion], !=, literal[null]], &&, binary_operation[call[theParsedVersion.getDimensionForVersion, parameter[]], ==, member[.dimension]]]] begin[{] assign[member[.parsedVersion], member[.theParsedVersion]] return[member[.theParsedVersion]] else begin[{] None end[}] ThrowStatement(expression=MethodInvocation(arguments=[], member=getFormatInstance, postfix_operators=[], prefix_operators=[], qualifier=FormatException, selectors=[], type_arguments=None), label=None) end[}] END[}]
identifier[Version] identifier[readVersion] operator[SEP] operator[SEP] Keyword[throws] identifier[FormatException] { Keyword[if] operator[SEP] identifier[parsedVersion] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[parsedVersion] operator[SEP] } Keyword[int] identifier[dimension] operator[=] identifier[bitMatrix] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[provisionalVersion] operator[=] operator[SEP] identifier[dimension] operator[-] Other[17] operator[SEP] operator[/] Other[4] operator[SEP] Keyword[if] operator[SEP] identifier[provisionalVersion] operator[<=] Other[6] operator[SEP] { Keyword[return] identifier[Version] operator[SEP] identifier[getVersionForNumber] operator[SEP] identifier[provisionalVersion] operator[SEP] operator[SEP] } Keyword[int] identifier[versionBits] operator[=] Other[0] operator[SEP] Keyword[int] identifier[ijMin] operator[=] identifier[dimension] operator[-] Other[11] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[5] operator[SEP] identifier[j] operator[>=] Other[0] operator[SEP] identifier[j] operator[--] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[dimension] operator[-] Other[9] operator[SEP] identifier[i] operator[>=] identifier[ijMin] operator[SEP] identifier[i] operator[--] operator[SEP] { identifier[versionBits] operator[=] identifier[copyBit] operator[SEP] identifier[i] , identifier[j] , identifier[versionBits] operator[SEP] operator[SEP] } } identifier[Version] identifier[theParsedVersion] operator[=] identifier[Version] operator[SEP] identifier[decodeVersionInformation] operator[SEP] identifier[versionBits] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[theParsedVersion] operator[!=] Other[null] operator[&&] identifier[theParsedVersion] operator[SEP] identifier[getDimensionForVersion] operator[SEP] operator[SEP] operator[==] identifier[dimension] operator[SEP] { identifier[parsedVersion] operator[=] identifier[theParsedVersion] operator[SEP] Keyword[return] identifier[theParsedVersion] operator[SEP] } identifier[versionBits] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[5] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] identifier[i] operator[--] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[dimension] operator[-] Other[9] operator[SEP] identifier[j] operator[>=] identifier[ijMin] operator[SEP] identifier[j] operator[--] operator[SEP] { identifier[versionBits] operator[=] identifier[copyBit] operator[SEP] identifier[i] , identifier[j] , identifier[versionBits] operator[SEP] operator[SEP] } } identifier[theParsedVersion] operator[=] identifier[Version] operator[SEP] identifier[decodeVersionInformation] operator[SEP] identifier[versionBits] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[theParsedVersion] operator[!=] Other[null] operator[&&] identifier[theParsedVersion] operator[SEP] identifier[getDimensionForVersion] operator[SEP] operator[SEP] operator[==] identifier[dimension] operator[SEP] { identifier[parsedVersion] operator[=] identifier[theParsedVersion] operator[SEP] Keyword[return] identifier[theParsedVersion] operator[SEP] } Keyword[throw] identifier[FormatException] operator[SEP] identifier[getFormatInstance] operator[SEP] operator[SEP] operator[SEP] }
public static String formURLDecode(String string) { Preconditions.checkNotNull(string, "Cannot decode null string"); try { return URLDecoder.decode(string, UTF_8); } catch (UnsupportedEncodingException uee) { throw new IllegalStateException(ERROR_MSG, uee); } }
class class_name[name] begin[{] method[formURLDecode, return_type[type[String]], modifier[public static], parameter[string]] begin[{] call[Preconditions.checkNotNull, parameter[member[.string], literal["Cannot decode null string"]]] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=UTF_8, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=decode, postfix_operators=[], prefix_operators=[], qualifier=URLDecoder, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ERROR_MSG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=uee, 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=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=uee, types=['UnsupportedEncodingException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[formURLDecode] operator[SEP] identifier[String] identifier[string] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[string] , literal[String] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[URLDecoder] operator[SEP] identifier[decode] operator[SEP] identifier[string] , identifier[UTF_8] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[UnsupportedEncodingException] identifier[uee] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[ERROR_MSG] , identifier[uee] operator[SEP] operator[SEP] } }
@Override public CreatePlatformApplicationResult createPlatformApplication(CreatePlatformApplicationRequest request) { request = beforeClientExecution(request); return executeCreatePlatformApplication(request); }
class class_name[name] begin[{] method[createPlatformApplication, return_type[type[CreatePlatformApplicationResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeCreatePlatformApplication, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CreatePlatformApplicationResult] identifier[createPlatformApplication] operator[SEP] identifier[CreatePlatformApplicationRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeCreatePlatformApplication] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Prototype @Requires(beans = AsyncReporterConfiguration.class) @Requires(missingBeans = Reporter.class) AsyncReporter<Span> asyncReporter(AsyncReporterConfiguration configuration) { return configuration.getBuilder().build(); }
class class_name[name] begin[{] method[asyncReporter, return_type[type[AsyncReporter]], modifier[default], parameter[configuration]] begin[{] return[call[configuration.getBuilder, parameter[]]] end[}] END[}]
annotation[@] identifier[Prototype] annotation[@] identifier[Requires] operator[SEP] identifier[beans] operator[=] identifier[AsyncReporterConfiguration] operator[SEP] Keyword[class] operator[SEP] annotation[@] identifier[Requires] operator[SEP] identifier[missingBeans] operator[=] identifier[Reporter] operator[SEP] Keyword[class] operator[SEP] identifier[AsyncReporter] operator[<] identifier[Span] operator[>] identifier[asyncReporter] operator[SEP] identifier[AsyncReporterConfiguration] identifier[configuration] operator[SEP] { Keyword[return] identifier[configuration] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
protected boolean updateCurrentAndBestSolution(SolutionType solution, Evaluation evaluation, Validation validation){ // update current solution updateCurrentSolution(solution, evaluation, validation); // update best solution (only updates if solution is valid) return updateBestSolution(solution, evaluation, validation); }
class class_name[name] begin[{] method[updateCurrentAndBestSolution, return_type[type[boolean]], modifier[protected], parameter[solution, evaluation, validation]] begin[{] call[.updateCurrentSolution, parameter[member[.solution], member[.evaluation], member[.validation]]] return[call[.updateBestSolution, parameter[member[.solution], member[.evaluation], member[.validation]]]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[updateCurrentAndBestSolution] operator[SEP] identifier[SolutionType] identifier[solution] , identifier[Evaluation] identifier[evaluation] , identifier[Validation] identifier[validation] operator[SEP] { identifier[updateCurrentSolution] operator[SEP] identifier[solution] , identifier[evaluation] , identifier[validation] operator[SEP] operator[SEP] Keyword[return] identifier[updateBestSolution] operator[SEP] identifier[solution] , identifier[evaluation] , identifier[validation] operator[SEP] operator[SEP] }
public static <T extends Number> long divideRoundUp(final T dividend, final T divisor) { double average = divide(dividend, divisor); return RoundUp(average); }
class class_name[name] begin[{] method[divideRoundUp, return_type[type[long]], modifier[public static], parameter[dividend, divisor]] begin[{] local_variable[type[double], average] return[call[.RoundUp, parameter[member[.average]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Number] operator[>] Keyword[long] identifier[divideRoundUp] operator[SEP] Keyword[final] identifier[T] identifier[dividend] , Keyword[final] identifier[T] identifier[divisor] operator[SEP] { Keyword[double] identifier[average] operator[=] identifier[divide] operator[SEP] identifier[dividend] , identifier[divisor] operator[SEP] operator[SEP] Keyword[return] identifier[RoundUp] operator[SEP] identifier[average] operator[SEP] operator[SEP] }
public Map<String, Object> handle(List<QueryParameters> outputList) throws MjdbcException { return this.outputProcessor.toMap(outputList); }
class class_name[name] begin[{] method[handle, return_type[type[Map]], modifier[public], parameter[outputList]] begin[{] return[THIS[member[None.outputProcessor]call[None.toMap, parameter[member[.outputList]]]]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[handle] operator[SEP] identifier[List] operator[<] identifier[QueryParameters] operator[>] identifier[outputList] operator[SEP] Keyword[throws] identifier[MjdbcException] { Keyword[return] Keyword[this] operator[SEP] identifier[outputProcessor] operator[SEP] identifier[toMap] operator[SEP] identifier[outputList] operator[SEP] operator[SEP] }
@Override public CreateDeploymentResult createDeployment(CreateDeploymentRequest request) { request = beforeClientExecution(request); return executeCreateDeployment(request); }
class class_name[name] begin[{] method[createDeployment, return_type[type[CreateDeploymentResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeCreateDeployment, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CreateDeploymentResult] identifier[createDeployment] operator[SEP] identifier[CreateDeploymentRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeCreateDeployment] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
protected List<Command> handleCommands(ServerConnector serverConnector, List<Command> commands) { List<Command> results = new ArrayList<Command>(); for (Command command : commands) { if (LOG.isLoggable(Level.FINEST)) { LOG.finest("processing " + command); } // TODO: add a catch-all exception handler here ? results.addAll(serverConnector.receive(command)); } return results; }
class class_name[name] begin[{] method[handleCommands, return_type[type[List]], modifier[protected], parameter[serverConnector, commands]] begin[{] local_variable[type[List], results] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=FINEST, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[])], member=isLoggable, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="processing "), operandr=MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=finest, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=receive, postfix_operators=[], prefix_operators=[], qualifier=serverConnector, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=commands, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=command)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Command, sub_type=None))), label=None) return[member[.results]] end[}] END[}]
Keyword[protected] identifier[List] operator[<] identifier[Command] operator[>] identifier[handleCommands] operator[SEP] identifier[ServerConnector] identifier[serverConnector] , identifier[List] operator[<] identifier[Command] operator[>] identifier[commands] operator[SEP] { identifier[List] operator[<] identifier[Command] operator[>] identifier[results] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Command] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Command] identifier[command] operator[:] identifier[commands] operator[SEP] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINEST] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[finest] operator[SEP] literal[String] operator[+] identifier[command] operator[SEP] operator[SEP] } identifier[results] operator[SEP] identifier[addAll] operator[SEP] identifier[serverConnector] operator[SEP] identifier[receive] operator[SEP] identifier[command] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[results] operator[SEP] }
public static boolean isHasSaveAttr(final Cell cell, final String saveAttrs) { if (cell != null) { int columnIndex = cell.getColumnIndex(); String str = TieConstants.CELL_ADDR_PRE_FIX + columnIndex + "="; if ((saveAttrs != null) && (saveAttrs.indexOf(str) >= 0)) { return true; } } return false; }
class class_name[name] begin[{] method[isHasSaveAttr, return_type[type[boolean]], modifier[public static], parameter[cell, saveAttrs]] begin[{] if[binary_operation[member[.cell], !=, literal[null]]] begin[{] local_variable[type[int], columnIndex] local_variable[type[String], str] if[binary_operation[binary_operation[member[.saveAttrs], !=, literal[null]], &&, binary_operation[call[saveAttrs.indexOf, parameter[member[.str]]], >=, literal[0]]]] begin[{] return[literal[true]] else begin[{] None end[}] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isHasSaveAttr] operator[SEP] Keyword[final] identifier[Cell] identifier[cell] , Keyword[final] identifier[String] identifier[saveAttrs] operator[SEP] { Keyword[if] operator[SEP] identifier[cell] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[columnIndex] operator[=] identifier[cell] operator[SEP] identifier[getColumnIndex] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[str] operator[=] identifier[TieConstants] operator[SEP] identifier[CELL_ADDR_PRE_FIX] operator[+] identifier[columnIndex] operator[+] literal[String] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[saveAttrs] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[saveAttrs] operator[SEP] identifier[indexOf] operator[SEP] identifier[str] operator[SEP] operator[>=] Other[0] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public Query<T> fetch(String path, String fetchProperties) { return query().fetch(path, fetchProperties); }
class class_name[name] begin[{] method[fetch, return_type[type[Query]], modifier[public], parameter[path, fetchProperties]] begin[{] return[call[.query, parameter[]]] end[}] END[}]
Keyword[public] identifier[Query] operator[<] identifier[T] operator[>] identifier[fetch] operator[SEP] identifier[String] identifier[path] , identifier[String] identifier[fetchProperties] operator[SEP] { Keyword[return] identifier[query] operator[SEP] operator[SEP] operator[SEP] identifier[fetch] operator[SEP] identifier[path] , identifier[fetchProperties] operator[SEP] operator[SEP] }
public Annotation buildAnnotation(final Class<?> annoClass, final AnnotationInfo info) throws AnnotationReadException { final Map<String, Object> defaultValues = new HashMap<>(); for(Method method : annoClass.getMethods()) { final Object defaultValue = method.getDefaultValue(); if(defaultValue != null) { defaultValues.put(method.getName(), defaultValue); } } final Map<String, Object> xmlValues = new HashMap<>(); for(String key : info.getAttributeKeys()) { try { Object value = Ognl.getValue(info.getAttribute(key), ognlContext, new Object()); xmlValues.put(key, value); } catch(OgnlException e) { throw new AnnotationReadException(String.format("fail annotation attribute %s with ognl.", key), e); } } ClassLoader loader = classLoader; if(loader == null){ loader = Thread.currentThread().getContextClassLoader(); } Object obj = Proxy.newProxyInstance(loader, new Class[]{annoClass}, new InvocationHandler() { @Override public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable { String name = method.getName(); if (name.equals("annotationType")) { return annoClass; } else if(xmlValues.containsKey(name)){ return xmlValues.get(name); } else { return defaultValues.get(name); } } }); return (Annotation) obj; }
class class_name[name] begin[{] method[buildAnnotation, return_type[type[Annotation]], modifier[public], parameter[annoClass, info]] begin[{] local_variable[type[Map], defaultValues] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDefaultValue, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), name=defaultValue)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=defaultValue, 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=getName, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), MemberReference(member=defaultValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=defaultValues, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getMethods, postfix_operators=[], prefix_operators=[], qualifier=annoClass, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=method)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))), label=None) local_variable[type[Map], xmlValues] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=info, selectors=[], type_arguments=None), MemberReference(member=ognlContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=Ognl, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=xmlValues, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="fail annotation attribute %s with ognl."), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, 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=AnnotationReadException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['OgnlException']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAttributeKeys, postfix_operators=[], prefix_operators=[], qualifier=info, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) local_variable[type[ClassLoader], loader] if[binary_operation[member[.loader], ==, literal[null]]] begin[{] assign[member[.loader], call[Thread.currentThread, parameter[]]] else begin[{] None end[}] local_variable[type[Object], obj] return[Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Annotation, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Annotation] identifier[buildAnnotation] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[annoClass] , Keyword[final] identifier[AnnotationInfo] identifier[info] operator[SEP] Keyword[throws] identifier[AnnotationReadException] { Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[defaultValues] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Method] identifier[method] operator[:] identifier[annoClass] operator[SEP] identifier[getMethods] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[Object] identifier[defaultValue] operator[=] identifier[method] operator[SEP] identifier[getDefaultValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[defaultValue] operator[!=] Other[null] operator[SEP] { identifier[defaultValues] operator[SEP] identifier[put] operator[SEP] identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[defaultValue] operator[SEP] operator[SEP] } } Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[xmlValues] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[key] operator[:] identifier[info] operator[SEP] identifier[getAttributeKeys] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[Object] identifier[value] operator[=] identifier[Ognl] operator[SEP] identifier[getValue] operator[SEP] identifier[info] operator[SEP] identifier[getAttribute] operator[SEP] identifier[key] operator[SEP] , identifier[ognlContext] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[xmlValues] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[OgnlException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[AnnotationReadException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[key] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } identifier[ClassLoader] identifier[loader] operator[=] identifier[classLoader] operator[SEP] Keyword[if] operator[SEP] identifier[loader] operator[==] Other[null] operator[SEP] { identifier[loader] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getContextClassLoader] operator[SEP] operator[SEP] operator[SEP] } identifier[Object] identifier[obj] operator[=] identifier[Proxy] operator[SEP] identifier[newProxyInstance] operator[SEP] identifier[loader] , Keyword[new] identifier[Class] operator[SEP] operator[SEP] { identifier[annoClass] } , Keyword[new] identifier[InvocationHandler] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[invoke] operator[SEP] Keyword[final] identifier[Object] identifier[proxy] , Keyword[final] identifier[Method] identifier[method] , Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Throwable] { identifier[String] identifier[name] operator[=] identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[annoClass] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[xmlValues] operator[SEP] identifier[containsKey] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] identifier[xmlValues] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[defaultValues] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[Annotation] operator[SEP] identifier[obj] operator[SEP] }
@SuppressWarnings({ "unchecked" }) public static SelectResults<Object> executeOnBuckets(String queryString, Object[] queryParameters, Region region, Set<Object> keys) throws QueryException { if ((queryString == null) || (queryString.length() == 0)) { throw new QueryException("You must specify query string for execution."); } int limit = extractLimit(queryString); BucketOrientedQueryFunctionArgument functionArgument = new BucketOrientedQueryFunctionArgument(queryString, queryParameters); BucketOrientedQueryFunction function = new BucketOrientedQueryFunction(); FunctionService.registerFunction(function); List<List<Object>> queryResults; try { queryResults = (List<List<Object>>) FunctionService.onRegion(region).withFilter(keys) .withArgs(functionArgument).execute(function).getResult(); } catch (FunctionException e) { logger.error("Failed to execute bucket oriented query function: " + function, e); throw new QueryException(e.getMessage()); } return formatSelectResults(queryResults, limit); }
class class_name[name] begin[{] method[executeOnBuckets, return_type[type[SelectResults]], modifier[public static], parameter[queryString, queryParameters, region, keys]] begin[{] if[binary_operation[binary_operation[member[.queryString], ==, literal[null]], ||, binary_operation[call[queryString.length, parameter[]], ==, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="You must specify query string for execution.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QueryException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], limit] local_variable[type[BucketOrientedQueryFunctionArgument], functionArgument] local_variable[type[BucketOrientedQueryFunction], function] call[FunctionService.registerFunction, parameter[member[.function]]] local_variable[type[List], queryResults] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=queryResults, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=region, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onRegion, postfix_operators=[], prefix_operators=[], qualifier=FunctionService, selectors=[MethodInvocation(arguments=[MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withFilter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=functionArgument, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withArgs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=function, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=execute, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getResult, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=List, sub_type=None))], dimensions=[], name=List, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to execute bucket oriented query function: "), operandr=MemberReference(member=function, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QueryException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['FunctionException']))], finally_block=None, label=None, resources=None) return[call[.formatSelectResults, parameter[member[.queryResults], member[.limit]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] } operator[SEP] Keyword[public] Keyword[static] identifier[SelectResults] operator[<] identifier[Object] operator[>] identifier[executeOnBuckets] operator[SEP] identifier[String] identifier[queryString] , identifier[Object] operator[SEP] operator[SEP] identifier[queryParameters] , identifier[Region] identifier[region] , identifier[Set] operator[<] identifier[Object] operator[>] identifier[keys] operator[SEP] Keyword[throws] identifier[QueryException] { Keyword[if] operator[SEP] operator[SEP] identifier[queryString] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[queryString] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[QueryException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[int] identifier[limit] operator[=] identifier[extractLimit] operator[SEP] identifier[queryString] operator[SEP] operator[SEP] identifier[BucketOrientedQueryFunctionArgument] identifier[functionArgument] operator[=] Keyword[new] identifier[BucketOrientedQueryFunctionArgument] operator[SEP] identifier[queryString] , identifier[queryParameters] operator[SEP] operator[SEP] identifier[BucketOrientedQueryFunction] identifier[function] operator[=] Keyword[new] identifier[BucketOrientedQueryFunction] operator[SEP] operator[SEP] operator[SEP] identifier[FunctionService] operator[SEP] identifier[registerFunction] operator[SEP] identifier[function] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[List] operator[<] identifier[Object] operator[>] operator[>] identifier[queryResults] operator[SEP] Keyword[try] { identifier[queryResults] operator[=] operator[SEP] identifier[List] operator[<] identifier[List] operator[<] identifier[Object] operator[>] operator[>] operator[SEP] identifier[FunctionService] operator[SEP] identifier[onRegion] operator[SEP] identifier[region] operator[SEP] operator[SEP] identifier[withFilter] operator[SEP] identifier[keys] operator[SEP] operator[SEP] identifier[withArgs] operator[SEP] identifier[functionArgument] operator[SEP] operator[SEP] identifier[execute] operator[SEP] identifier[function] operator[SEP] operator[SEP] identifier[getResult] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[FunctionException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[function] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[QueryException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[formatSelectResults] operator[SEP] identifier[queryResults] , identifier[limit] operator[SEP] operator[SEP] }
public GeneratedScript generateScript(final PluginStepContext context, final Map<String, Object> configuration, final INodeEntry entry) { if (debug) { System.err.println("DEBUG for ExampleRemoteScriptNodeStepPlugin is true"); } if (jam) { /** * Returns a script to execute */ return GeneratedScriptBuilder.script( "#!/bin/bash\n" + "echo this is node " + entry.getNodename() + "\n" + "echo stepnum " + context.getStepNumber() + "\n" + "echo step context " + context.getStepContext() + "\n" + "echo funky is " + funky + "\n" + "echo fruit is " + fruit + "\n" + "echo amount is " + amount + "\n" + "echo money is " + money + "\n" + "echo cake is " + cake + "\n" + "echo extra: " + configuration + "\n" + "echo thesis: '" + thesis.replaceAll("'", "'\"'\"'") + "'\n" , null ); } else { /** * Returns a command to execute. */ return GeneratedScriptBuilder.command("echo", context.getStepNumber() + " " + context.getStepContext() + " " + "Hi funky is" + " (" + funky + ")" + " jam is" + jam ); } }
class class_name[name] begin[{] method[generateScript, return_type[type[GeneratedScript]], modifier[public], parameter[context, configuration, entry]] begin[{] if[member[.debug]] begin[{] call[System.err.println, parameter[literal["DEBUG for ExampleRemoteScriptNodeStepPlugin is true"]]] else begin[{] None end[}] if[member[.jam]] begin[{] return[call[GeneratedScriptBuilder.script, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["#!/bin/bash\n"], +, literal["echo this is node "]], +, call[entry.getNodename, parameter[]]], +, literal["\n"]], +, literal["echo stepnum "]], +, call[context.getStepNumber, parameter[]]], +, literal["\n"]], +, literal["echo step context "]], +, call[context.getStepContext, parameter[]]], +, literal["\n"]], +, literal["echo funky is "]], +, member[.funky]], +, literal["\n"]], +, literal["echo fruit is "]], +, member[.fruit]], +, literal["\n"]], +, literal["echo amount is "]], +, member[.amount]], +, literal["\n"]], +, literal["echo money is "]], +, member[.money]], +, literal["\n"]], +, literal["echo cake is "]], +, member[.cake]], +, literal["\n"]], +, literal["echo extra: "]], +, member[.configuration]], +, literal["\n"]], +, literal["echo thesis: '"]], +, call[thesis.replaceAll, parameter[literal["'"], literal["'\"'\"'"]]]], +, literal["'\n"]], literal[null]]]] else begin[{] return[call[GeneratedScriptBuilder.command, parameter[literal["echo"], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[call[context.getStepNumber, parameter[]], +, literal[" "]], +, call[context.getStepContext, parameter[]]], +, literal[" "]], +, literal["Hi funky is"]], +, literal[" ("]], +, member[.funky]], +, literal[")"]], +, literal[" jam is"]], +, member[.jam]]]]] end[}] end[}] END[}]
Keyword[public] identifier[GeneratedScript] identifier[generateScript] operator[SEP] Keyword[final] identifier[PluginStepContext] identifier[context] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[configuration] , Keyword[final] identifier[INodeEntry] identifier[entry] operator[SEP] { Keyword[if] operator[SEP] identifier[debug] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[jam] operator[SEP] { Keyword[return] identifier[GeneratedScriptBuilder] operator[SEP] identifier[script] operator[SEP] literal[String] operator[+] literal[String] operator[+] identifier[entry] operator[SEP] identifier[getNodename] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[context] operator[SEP] identifier[getStepNumber] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[context] operator[SEP] identifier[getStepContext] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[funky] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[fruit] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[amount] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[money] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[cake] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[configuration] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[thesis] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[+] literal[String] , Other[null] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[GeneratedScriptBuilder] operator[SEP] identifier[command] operator[SEP] literal[String] , identifier[context] operator[SEP] identifier[getStepNumber] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[context] operator[SEP] identifier[getStepContext] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[funky] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[jam] operator[SEP] operator[SEP] } }
public static CSLItemData convert(String documentId, Map<String, Object> document) { //convert citation id String id = (String)document.get(FIELD_CITATION_KEY); if (id == null) { id = documentId; } //convert type String mtype = strOrNull(document.get(FIELD_TYPE)); CSLType type = toType(mtype); CSLItemDataBuilder builder = new CSLItemDataBuilder().id(id).type(type); //convert authors if (document.containsKey(FIELD_AUTHORS)) { @SuppressWarnings("unchecked") List<Map<String, Object>> al = (List<Map<String, Object>>)document.get(FIELD_AUTHORS); builder.author(toAuthors(al)); } //convert editors if (document.containsKey(FIELD_EDITORS)) { @SuppressWarnings("unchecked") List<Map<String, Object>> el = (List<Map<String, Object>>)document.get(FIELD_EDITORS); CSLName[] editors = toAuthors(el); builder.editor(editors); builder.collectionEditor(editors); builder.containerAuthor(editors); } if (document.containsKey(FIELD_SERIES_EDITOR)) { String seriesEditor = strOrNull(document.get(FIELD_SERIES_EDITOR)); if (seriesEditor != null) { CSLName[] sen = NameParser.parse(seriesEditor); builder.collectionEditor(sen); builder.containerAuthor(sen); } } //convert translators if (document.containsKey(FIELD_TRANSLATORS)) { @SuppressWarnings("unchecked") List<Map<String, Object>> tl = (List<Map<String, Object>>)document.get(FIELD_TRANSLATORS); builder.translator(toAuthors(tl)); } //convert issue date if (document.containsKey(FIELD_YEAR)) { CSLDateBuilder db = new CSLDateBuilder(); int year = Integer.parseInt(document.get(FIELD_YEAR).toString()); if (document.containsKey(FIELD_MONTH)) { int month = Integer.parseInt(document.get(FIELD_MONTH).toString()); if (document.containsKey(FIELD_DAY)) { int day = Integer.parseInt(document.get(FIELD_DAY).toString()); db.dateParts(year, month, day); } else { db.dateParts(year, month); } } else { db.dateParts(year); } CSLDate d = db.build(); builder.issued(d); builder.eventDate(d); } //convert number if (document.containsKey(FIELD_REVISION)) { builder.number(strOrNull(document.get(FIELD_REVISION))); } else { builder.number(strOrNull(document.get(FIELD_SERIES_NUMBER))); } //convert container title String containerTitle; if (document.containsKey(FIELD_SERIES)) { containerTitle = strOrNull(document.get(FIELD_SERIES)); } else { containerTitle = strOrNull(document.get(FIELD_SOURCE)); } builder.containerTitle(containerTitle); builder.collectionTitle(containerTitle); //convert publisher if (mtype.equalsIgnoreCase(TYPE_PATENT) && document.containsKey(FIELD_SOURCE)) { builder.publisher(strOrNull(document.get(FIELD_SOURCE))); } else { builder.publisher(strOrNull(document.get(FIELD_PUBLISHER))); } //convert access date if (document.containsKey(FIELD_ACCESSED)) { builder.accessed(new CSLDateBuilder().raw( strOrNull(document.get(FIELD_ACCESSED))).build()); } //convert identifiers if (document.containsKey(FIELD_IDENTIFIERS)) { @SuppressWarnings("unchecked") Map<String, String> identifiers = (Map<String, String>)document.get(FIELD_IDENTIFIERS); builder.DOI(identifiers.get(IDENTIFIER_DOI)); builder.ISBN(identifiers.get(IDENTIFIER_ISBN)); builder.ISSN(identifiers.get(IDENTIFIER_ISSN)); builder.PMID(identifiers.get(IDENTIFIER_PMID)); } //convert keywords if (document.containsKey(FIELD_KEYWORDS)) { @SuppressWarnings("unchecked") List<String> keywords = (List<String>)document.get(FIELD_KEYWORDS); builder.keyword(StringUtils.join(keywords, ',')); } //convert URL if (document.containsKey(FIELD_WEBSITES)) { @SuppressWarnings("unchecked") List<String> websites = (List<String>)document.get(FIELD_WEBSITES); if (websites.size() > 0) { //use the first website only builder.URL(websites.get(0)); } } //convert other fields builder.abstrct(strOrNull(document.get(FIELD_ABSTRACT))); builder.chapterNumber(strOrNull(document.get(FIELD_CHAPTER))); builder.eventPlace(strOrNull(document.get(FIELD_CITY))); builder.publisherPlace(strOrNull(document.get(FIELD_CITY))); builder.edition(strOrNull(document.get(FIELD_EDITION))); builder.genre(strOrNull(document.get(FIELD_GENRE))); builder.issue(strOrNull(document.get(FIELD_ISSUE))); builder.language(strOrNull(document.get(FIELD_LANGUAGE))); builder.medium(strOrNull(document.get(FIELD_MEDIUM))); builder.page(strOrNull(document.get(FIELD_PAGES))); builder.shortTitle(strOrNull(document.get(FIELD_SHORT_TITLE))); builder.title(strOrNull(document.get(FIELD_TITLE))); builder.volume(strOrNull(document.get(FIELD_VOLUME))); return builder.build(); }
class class_name[name] begin[{] method[convert, return_type[type[CSLItemData]], modifier[public static], parameter[documentId, document]] begin[{] local_variable[type[String], id] if[binary_operation[member[.id], ==, literal[null]]] begin[{] assign[member[.id], member[.documentId]] else begin[{] None end[}] local_variable[type[String], mtype] local_variable[type[CSLType], type] local_variable[type[CSLItemDataBuilder], builder] if[call[document.containsKey, parameter[member[.FIELD_AUTHORS]]]] begin[{] local_variable[type[List], al] call[builder.author, parameter[call[.toAuthors, parameter[member[.al]]]]] else begin[{] None end[}] if[call[document.containsKey, parameter[member[.FIELD_EDITORS]]]] begin[{] local_variable[type[List], el] local_variable[type[CSLName], editors] call[builder.editor, parameter[member[.editors]]] call[builder.collectionEditor, parameter[member[.editors]]] call[builder.containerAuthor, parameter[member[.editors]]] else begin[{] None end[}] if[call[document.containsKey, parameter[member[.FIELD_SERIES_EDITOR]]]] begin[{] local_variable[type[String], seriesEditor] if[binary_operation[member[.seriesEditor], !=, literal[null]]] begin[{] local_variable[type[CSLName], sen] call[builder.collectionEditor, parameter[member[.sen]]] call[builder.containerAuthor, parameter[member[.sen]]] else begin[{] None end[}] else begin[{] None end[}] if[call[document.containsKey, parameter[member[.FIELD_TRANSLATORS]]]] begin[{] local_variable[type[List], tl] call[builder.translator, parameter[call[.toAuthors, parameter[member[.tl]]]]] else begin[{] None end[}] if[call[document.containsKey, parameter[member[.FIELD_YEAR]]]] begin[{] local_variable[type[CSLDateBuilder], db] local_variable[type[int], year] if[call[document.containsKey, parameter[member[.FIELD_MONTH]]]] begin[{] local_variable[type[int], month] if[call[document.containsKey, parameter[member[.FIELD_DAY]]]] begin[{] local_variable[type[int], day] call[db.dateParts, parameter[member[.year], member[.month], member[.day]]] else begin[{] call[db.dateParts, parameter[member[.year], member[.month]]] end[}] else begin[{] call[db.dateParts, parameter[member[.year]]] end[}] local_variable[type[CSLDate], d] call[builder.issued, parameter[member[.d]]] call[builder.eventDate, parameter[member[.d]]] else begin[{] None end[}] if[call[document.containsKey, parameter[member[.FIELD_REVISION]]]] begin[{] call[builder.number, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_REVISION]]]]]]] else begin[{] call[builder.number, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_SERIES_NUMBER]]]]]]] end[}] local_variable[type[String], containerTitle] if[call[document.containsKey, parameter[member[.FIELD_SERIES]]]] begin[{] assign[member[.containerTitle], call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_SERIES]]]]]] else begin[{] assign[member[.containerTitle], call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_SOURCE]]]]]] end[}] call[builder.containerTitle, parameter[member[.containerTitle]]] call[builder.collectionTitle, parameter[member[.containerTitle]]] if[binary_operation[call[mtype.equalsIgnoreCase, parameter[member[.TYPE_PATENT]]], &&, call[document.containsKey, parameter[member[.FIELD_SOURCE]]]]] begin[{] call[builder.publisher, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_SOURCE]]]]]]] else begin[{] call[builder.publisher, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_PUBLISHER]]]]]]] end[}] if[call[document.containsKey, parameter[member[.FIELD_ACCESSED]]]] begin[{] call[builder.accessed, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=FIELD_ACCESSED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=document, selectors=[], type_arguments=None)], member=strOrNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=raw, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=CSLDateBuilder, sub_type=None))]] else begin[{] None end[}] if[call[document.containsKey, parameter[member[.FIELD_IDENTIFIERS]]]] begin[{] local_variable[type[Map], identifiers] call[builder.DOI, parameter[call[identifiers.get, parameter[member[.IDENTIFIER_DOI]]]]] call[builder.ISBN, parameter[call[identifiers.get, parameter[member[.IDENTIFIER_ISBN]]]]] call[builder.ISSN, parameter[call[identifiers.get, parameter[member[.IDENTIFIER_ISSN]]]]] call[builder.PMID, parameter[call[identifiers.get, parameter[member[.IDENTIFIER_PMID]]]]] else begin[{] None end[}] if[call[document.containsKey, parameter[member[.FIELD_KEYWORDS]]]] begin[{] local_variable[type[List], keywords] call[builder.keyword, parameter[call[StringUtils.join, parameter[member[.keywords], literal[',']]]]] else begin[{] None end[}] if[call[document.containsKey, parameter[member[.FIELD_WEBSITES]]]] begin[{] local_variable[type[List], websites] if[binary_operation[call[websites.size, parameter[]], >, literal[0]]] begin[{] call[builder.URL, parameter[call[websites.get, parameter[literal[0]]]]] else begin[{] None end[}] else begin[{] None end[}] call[builder.abstrct, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_ABSTRACT]]]]]]] call[builder.chapterNumber, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_CHAPTER]]]]]]] call[builder.eventPlace, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_CITY]]]]]]] call[builder.publisherPlace, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_CITY]]]]]]] call[builder.edition, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_EDITION]]]]]]] call[builder.genre, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_GENRE]]]]]]] call[builder.issue, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_ISSUE]]]]]]] call[builder.language, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_LANGUAGE]]]]]]] call[builder.medium, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_MEDIUM]]]]]]] call[builder.page, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_PAGES]]]]]]] call[builder.shortTitle, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_SHORT_TITLE]]]]]]] call[builder.title, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_TITLE]]]]]]] call[builder.volume, parameter[call[.strOrNull, parameter[call[document.get, parameter[member[.FIELD_VOLUME]]]]]]] return[call[builder.build, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CSLItemData] identifier[convert] operator[SEP] identifier[String] identifier[documentId] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[document] operator[SEP] { identifier[String] identifier[id] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_CITATION_KEY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[id] operator[==] Other[null] operator[SEP] { identifier[id] operator[=] identifier[documentId] operator[SEP] } identifier[String] identifier[mtype] operator[=] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_TYPE] operator[SEP] operator[SEP] operator[SEP] identifier[CSLType] identifier[type] operator[=] identifier[toType] operator[SEP] identifier[mtype] operator[SEP] operator[SEP] identifier[CSLItemDataBuilder] identifier[builder] operator[=] Keyword[new] identifier[CSLItemDataBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[id] operator[SEP] identifier[id] operator[SEP] operator[SEP] identifier[type] operator[SEP] identifier[type] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[document] operator[SEP] identifier[containsKey] operator[SEP] identifier[FIELD_AUTHORS] operator[SEP] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] identifier[al] operator[=] operator[SEP] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_AUTHORS] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[author] operator[SEP] identifier[toAuthors] operator[SEP] identifier[al] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[document] operator[SEP] identifier[containsKey] operator[SEP] identifier[FIELD_EDITORS] operator[SEP] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] identifier[el] operator[=] operator[SEP] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_EDITORS] operator[SEP] operator[SEP] identifier[CSLName] operator[SEP] operator[SEP] identifier[editors] operator[=] identifier[toAuthors] operator[SEP] identifier[el] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[editor] operator[SEP] identifier[editors] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[collectionEditor] operator[SEP] identifier[editors] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[containerAuthor] operator[SEP] identifier[editors] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[document] operator[SEP] identifier[containsKey] operator[SEP] identifier[FIELD_SERIES_EDITOR] operator[SEP] operator[SEP] { identifier[String] identifier[seriesEditor] operator[=] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_SERIES_EDITOR] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[seriesEditor] operator[!=] Other[null] operator[SEP] { identifier[CSLName] operator[SEP] operator[SEP] identifier[sen] operator[=] identifier[NameParser] operator[SEP] identifier[parse] operator[SEP] identifier[seriesEditor] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[collectionEditor] operator[SEP] identifier[sen] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[containerAuthor] operator[SEP] identifier[sen] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[document] operator[SEP] identifier[containsKey] operator[SEP] identifier[FIELD_TRANSLATORS] operator[SEP] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] identifier[tl] operator[=] operator[SEP] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_TRANSLATORS] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[translator] operator[SEP] identifier[toAuthors] operator[SEP] identifier[tl] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[document] operator[SEP] identifier[containsKey] operator[SEP] identifier[FIELD_YEAR] operator[SEP] operator[SEP] { identifier[CSLDateBuilder] identifier[db] operator[=] Keyword[new] identifier[CSLDateBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[year] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_YEAR] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[document] operator[SEP] identifier[containsKey] operator[SEP] identifier[FIELD_MONTH] operator[SEP] operator[SEP] { Keyword[int] identifier[month] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_MONTH] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[document] operator[SEP] identifier[containsKey] operator[SEP] identifier[FIELD_DAY] operator[SEP] operator[SEP] { Keyword[int] identifier[day] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_DAY] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[db] operator[SEP] identifier[dateParts] operator[SEP] identifier[year] , identifier[month] , identifier[day] operator[SEP] operator[SEP] } Keyword[else] { identifier[db] operator[SEP] identifier[dateParts] operator[SEP] identifier[year] , identifier[month] operator[SEP] operator[SEP] } } Keyword[else] { identifier[db] operator[SEP] identifier[dateParts] operator[SEP] identifier[year] operator[SEP] operator[SEP] } identifier[CSLDate] identifier[d] operator[=] identifier[db] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[issued] operator[SEP] identifier[d] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[eventDate] operator[SEP] identifier[d] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[document] operator[SEP] identifier[containsKey] operator[SEP] identifier[FIELD_REVISION] operator[SEP] operator[SEP] { identifier[builder] operator[SEP] identifier[number] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_REVISION] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[builder] operator[SEP] identifier[number] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_SERIES_NUMBER] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[containerTitle] operator[SEP] Keyword[if] operator[SEP] identifier[document] operator[SEP] identifier[containsKey] operator[SEP] identifier[FIELD_SERIES] operator[SEP] operator[SEP] { identifier[containerTitle] operator[=] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_SERIES] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[containerTitle] operator[=] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_SOURCE] operator[SEP] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[containerTitle] operator[SEP] identifier[containerTitle] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[collectionTitle] operator[SEP] identifier[containerTitle] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mtype] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[TYPE_PATENT] operator[SEP] operator[&&] identifier[document] operator[SEP] identifier[containsKey] operator[SEP] identifier[FIELD_SOURCE] operator[SEP] operator[SEP] { identifier[builder] operator[SEP] identifier[publisher] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_SOURCE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[builder] operator[SEP] identifier[publisher] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_PUBLISHER] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[document] operator[SEP] identifier[containsKey] operator[SEP] identifier[FIELD_ACCESSED] operator[SEP] operator[SEP] { identifier[builder] operator[SEP] identifier[accessed] operator[SEP] Keyword[new] identifier[CSLDateBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[raw] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_ACCESSED] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[document] operator[SEP] identifier[containsKey] operator[SEP] identifier[FIELD_IDENTIFIERS] operator[SEP] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[identifiers] operator[=] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_IDENTIFIERS] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[DOI] operator[SEP] identifier[identifiers] operator[SEP] identifier[get] operator[SEP] identifier[IDENTIFIER_DOI] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[ISBN] operator[SEP] identifier[identifiers] operator[SEP] identifier[get] operator[SEP] identifier[IDENTIFIER_ISBN] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[ISSN] operator[SEP] identifier[identifiers] operator[SEP] identifier[get] operator[SEP] identifier[IDENTIFIER_ISSN] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[PMID] operator[SEP] identifier[identifiers] operator[SEP] identifier[get] operator[SEP] identifier[IDENTIFIER_PMID] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[document] operator[SEP] identifier[containsKey] operator[SEP] identifier[FIELD_KEYWORDS] operator[SEP] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[keywords] operator[=] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_KEYWORDS] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[keyword] operator[SEP] identifier[StringUtils] operator[SEP] identifier[join] operator[SEP] identifier[keywords] , literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[document] operator[SEP] identifier[containsKey] operator[SEP] identifier[FIELD_WEBSITES] operator[SEP] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[websites] operator[=] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_WEBSITES] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[websites] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[builder] operator[SEP] identifier[URL] operator[SEP] identifier[websites] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } } identifier[builder] operator[SEP] identifier[abstrct] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_ABSTRACT] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[chapterNumber] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_CHAPTER] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[eventPlace] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_CITY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[publisherPlace] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_CITY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[edition] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_EDITION] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[genre] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_GENRE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[issue] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_ISSUE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[language] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_LANGUAGE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[medium] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_MEDIUM] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[page] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_PAGES] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[shortTitle] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_SHORT_TITLE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[title] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_TITLE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[volume] operator[SEP] identifier[strOrNull] operator[SEP] identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[FIELD_VOLUME] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
@Override public int compare(final Object obj1, final Object obj2) { Comparable<?> comparable1 = getComparable(obj1); Comparable<?> comparable2 = getComparable(obj2); return Util.compareAllowNull(comparable1, comparable2); }
class class_name[name] begin[{] method[compare, return_type[type[int]], modifier[public], parameter[obj1, obj2]] begin[{] local_variable[type[Comparable], comparable1] local_variable[type[Comparable], comparable2] return[call[Util.compareAllowNull, parameter[member[.comparable1], member[.comparable2]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compare] operator[SEP] Keyword[final] identifier[Object] identifier[obj1] , Keyword[final] identifier[Object] identifier[obj2] operator[SEP] { identifier[Comparable] operator[<] operator[?] operator[>] identifier[comparable1] operator[=] identifier[getComparable] operator[SEP] identifier[obj1] operator[SEP] operator[SEP] identifier[Comparable] operator[<] operator[?] operator[>] identifier[comparable2] operator[=] identifier[getComparable] operator[SEP] identifier[obj2] operator[SEP] operator[SEP] Keyword[return] identifier[Util] operator[SEP] identifier[compareAllowNull] operator[SEP] identifier[comparable1] , identifier[comparable2] operator[SEP] operator[SEP] }
public long readNBit(int n) throws IOException { if (n > 64) throw new IllegalArgumentException("Can not readByte more then 64 bit"); long val = 0; for (int i = 0; i < n; i++) { val <<= 1; val |= read1Bit(); } return val; }
class class_name[name] begin[{] method[readNBit, return_type[type[long]], modifier[public], parameter[n]] begin[{] if[binary_operation[member[.n], >, literal[64]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can not readByte more then 64 bit")], 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[long], val] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=<<=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=|=, value=MethodInvocation(arguments=[], member=read1Bit, 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=n, 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[.val]] end[}] END[}]
Keyword[public] Keyword[long] identifier[readNBit] operator[SEP] Keyword[int] identifier[n] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[n] operator[>] Other[64] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[long] identifier[val] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[val] operator[<<=] Other[1] operator[SEP] identifier[val] operator[|=] identifier[read1Bit] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[val] operator[SEP] }
public FeatureManagerBuilder togglzConfig(TogglzConfig config) { stateRepository(config.getStateRepository()); featureEnum(config.getFeatureClass()); userProvider(config.getUserProvider()); return this; }
class class_name[name] begin[{] method[togglzConfig, return_type[type[FeatureManagerBuilder]], modifier[public], parameter[config]] begin[{] call[.stateRepository, parameter[call[config.getStateRepository, parameter[]]]] call[.featureEnum, parameter[call[config.getFeatureClass, parameter[]]]] call[.userProvider, parameter[call[config.getUserProvider, parameter[]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[FeatureManagerBuilder] identifier[togglzConfig] operator[SEP] identifier[TogglzConfig] identifier[config] operator[SEP] { identifier[stateRepository] operator[SEP] identifier[config] operator[SEP] identifier[getStateRepository] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[featureEnum] operator[SEP] identifier[config] operator[SEP] identifier[getFeatureClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[userProvider] operator[SEP] identifier[config] operator[SEP] identifier[getUserProvider] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
protected List<Node> getTransformableNodes(final List<Node> childNodes) { final List<Node> nodes = new LinkedList<Node>(); for (final Node childNode : childNodes) { if (isTransformableNode(childNode)) { nodes.add(childNode); } } return nodes; }
class class_name[name] begin[{] method[getTransformableNodes, return_type[type[List]], modifier[protected], parameter[childNodes]] begin[{] local_variable[type[List], nodes] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=childNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isTransformableNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=childNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=nodes, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=childNodes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=childNode)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None))), label=None) return[member[.nodes]] end[}] END[}]
Keyword[protected] identifier[List] operator[<] identifier[Node] operator[>] identifier[getTransformableNodes] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Node] operator[>] identifier[childNodes] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[Node] operator[>] identifier[nodes] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[Node] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Node] identifier[childNode] operator[:] identifier[childNodes] operator[SEP] { Keyword[if] operator[SEP] identifier[isTransformableNode] operator[SEP] identifier[childNode] operator[SEP] operator[SEP] { identifier[nodes] operator[SEP] identifier[add] operator[SEP] identifier[childNode] operator[SEP] operator[SEP] } } Keyword[return] identifier[nodes] operator[SEP] }
public static Period getPeriod(Config config, String path) { try { return config.getPeriod(path); } catch (ConfigException.Missing | ConfigException.WrongType | ConfigException.BadValue e) { if (e instanceof ConfigException.WrongType || e instanceof ConfigException.BadValue) { LOGGER.warn(e.getMessage(), e); } return null; } }
class class_name[name] begin[{] method[getPeriod, return_type[type[Period]], modifier[public static], parameter[config, path]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPeriod, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ConfigException, sub_type=ReferenceType(arguments=None, dimensions=None, name=WrongType, sub_type=None)), operator=instanceof), operandr=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ConfigException, sub_type=ReferenceType(arguments=None, dimensions=None, name=BadValue, sub_type=None)), operator=instanceof), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, 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=['ConfigException.Missing', 'ConfigException.WrongType', 'ConfigException.BadValue']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Period] identifier[getPeriod] operator[SEP] identifier[Config] identifier[config] , identifier[String] identifier[path] operator[SEP] { Keyword[try] { Keyword[return] identifier[config] operator[SEP] identifier[getPeriod] operator[SEP] identifier[path] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ConfigException] operator[SEP] identifier[Missing] operator[|] identifier[ConfigException] operator[SEP] identifier[WrongType] operator[|] identifier[ConfigException] operator[SEP] identifier[BadValue] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[e] Keyword[instanceof] identifier[ConfigException] operator[SEP] identifier[WrongType] operator[||] identifier[e] Keyword[instanceof] identifier[ConfigException] operator[SEP] identifier[BadValue] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] } }
public Record _nextRecord() throws IOException { Tokenizer.Token token; String s; if (included != null) { Record rec = included.nextRecord(); if (rec != null) return rec; included = null; } if (generator != null) { Record rec = nextGenerated(); if (rec != null) return rec; endGenerate(); } while (true) { Name name; token = st.get(true, false); if (token.type == Tokenizer.WHITESPACE) { Tokenizer.Token next = st.get(); if (next.type == Tokenizer.EOL) continue; else if (next.type == Tokenizer.EOF) return null; else st.unget(); if (last == null) throw st.exception("no owner"); name = last.getName(); } else if (token.type == Tokenizer.EOL) continue; else if (token.type == Tokenizer.EOF) return null; else if (((String) token.value).charAt(0) == '$') { s = token.value; if (s.equalsIgnoreCase("$ORIGIN")) { origin = st.getName(Name.root); st.getEOL(); continue; } else if (s.equalsIgnoreCase("$TTL")) { defaultTTL = st.getTTL(); st.getEOL(); continue; } else if (s.equalsIgnoreCase("$INCLUDE")) { String filename = st.getString(); File newfile; if (file != null) { String parent = file.getParent(); newfile = new File(parent, filename); } else { newfile = new File(filename); } Name incorigin = origin; token = st.get(); if (token.isString()) { incorigin = parseName(token.value, Name.root); st.getEOL(); } included = new Master(newfile, incorigin, defaultTTL); /* * If we continued, we wouldn't be looking in * the new file. Recursing works better. */ return nextRecord(); } else if (s.equalsIgnoreCase("$GENERATE")) { if (generator != null) throw new IllegalStateException ("cannot nest $GENERATE"); startGenerate(); if (noExpandGenerate) { endGenerate(); continue; } return nextGenerated(); } else { throw st.exception("Invalid directive: " + s); } } else { s = token.value; name = parseName(s, origin); if (last != null && name.equals(last.getName())) { name = last.getName(); } } parseTTLClassAndType(); last = Record.fromString(name, currentType, currentDClass, currentTTL, st, origin); if (needSOATTL) { long ttl = ((SOARecord)last).getMinimum(); last.setTTL(ttl); defaultTTL = ttl; needSOATTL = false; } return last; } }
class class_name[name] begin[{] method[_nextRecord, return_type[type[Record]], modifier[public], parameter[]] begin[{] local_variable[type[Tokenizer], token] local_variable[type[String], s] if[binary_operation[member[.included], !=, literal[null]]] begin[{] local_variable[type[Record], rec] if[binary_operation[member[.rec], !=, literal[null]]] begin[{] return[member[.rec]] else begin[{] None end[}] assign[member[.included], literal[null]] else begin[{] None end[}] if[binary_operation[member[.generator], !=, literal[null]]] begin[{] local_variable[type[Record], rec] if[binary_operation[member[.rec], !=, literal[null]]] begin[{] return[member[.rec]] else begin[{] None end[}] call[.endGenerate, parameter[]] else begin[{] None end[}] while[literal[true]] begin[{] local_variable[type[Name], name] assign[member[.token], call[st.get, parameter[literal[true], literal[false]]]] if[binary_operation[member[token.type], ==, member[Tokenizer.WHITESPACE]]] begin[{] local_variable[type[Tokenizer], next] if[binary_operation[member[next.type], ==, member[Tokenizer.EOL]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] if[binary_operation[member[next.type], ==, member[Tokenizer.EOF]]] begin[{] return[literal[null]] else begin[{] call[st.unget, parameter[]] end[}] end[}] if[binary_operation[member[.last], ==, literal[null]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="no owner")], member=exception, postfix_operators=[], prefix_operators=[], qualifier=st, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] assign[member[.name], call[last.getName, parameter[]]] else begin[{] if[binary_operation[member[token.type], ==, member[Tokenizer.EOL]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] if[binary_operation[member[token.type], ==, member[Tokenizer.EOF]]] begin[{] return[literal[null]] else begin[{] if[binary_operation[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=token, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ==, literal['$']]] begin[{] assign[member[.s], member[token.value]] if[call[s.equalsIgnoreCase, parameter[literal["$ORIGIN"]]]] begin[{] assign[member[.origin], call[st.getName, parameter[member[Name.root]]]] call[st.getEOL, parameter[]] ContinueStatement(goto=None, label=None) else begin[{] if[call[s.equalsIgnoreCase, parameter[literal["$TTL"]]]] begin[{] assign[member[.defaultTTL], call[st.getTTL, parameter[]]] call[st.getEOL, parameter[]] ContinueStatement(goto=None, label=None) else begin[{] if[call[s.equalsIgnoreCase, parameter[literal["$INCLUDE"]]]] begin[{] local_variable[type[String], filename] local_variable[type[File], newfile] if[binary_operation[member[.file], !=, literal[null]]] begin[{] local_variable[type[String], parent] assign[member[.newfile], ClassCreator(arguments=[MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] assign[member[.newfile], ClassCreator(arguments=[MemberReference(member=filename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] end[}] local_variable[type[Name], incorigin] assign[member[.token], call[st.get, parameter[]]] if[call[token.isString, parameter[]]] begin[{] assign[member[.incorigin], call[.parseName, parameter[member[token.value], member[Name.root]]]] call[st.getEOL, parameter[]] else begin[{] None end[}] assign[member[.included], ClassCreator(arguments=[MemberReference(member=newfile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=incorigin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=defaultTTL, 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=Master, sub_type=None))] return[call[.nextRecord, parameter[]]] else begin[{] if[call[s.equalsIgnoreCase, parameter[literal["$GENERATE"]]]] begin[{] if[binary_operation[member[.generator], !=, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="cannot nest $GENERATE")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] call[.startGenerate, parameter[]] if[member[.noExpandGenerate]] begin[{] call[.endGenerate, parameter[]] ContinueStatement(goto=None, label=None) else begin[{] None end[}] return[call[.nextGenerated, parameter[]]] else begin[{] ThrowStatement(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid directive: "), operandr=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=exception, postfix_operators=[], prefix_operators=[], qualifier=st, selectors=[], type_arguments=None), label=None) end[}] end[}] end[}] end[}] else begin[{] assign[member[.s], member[token.value]] assign[member[.name], call[.parseName, parameter[member[.s], member[.origin]]]] if[binary_operation[binary_operation[member[.last], !=, literal[null]], &&, call[name.equals, parameter[call[last.getName, parameter[]]]]]] begin[{] assign[member[.name], call[last.getName, parameter[]]] else begin[{] None end[}] end[}] end[}] end[}] end[}] call[.parseTTLClassAndType, parameter[]] assign[member[.last], call[Record.fromString, parameter[member[.name], member[.currentType], member[.currentDClass], member[.currentTTL], member[.st], member[.origin]]]] if[member[.needSOATTL]] begin[{] local_variable[type[long], ttl] call[last.setTTL, parameter[member[.ttl]]] assign[member[.defaultTTL], member[.ttl]] assign[member[.needSOATTL], literal[false]] else begin[{] None end[}] return[member[.last]] end[}] end[}] END[}]
Keyword[public] identifier[Record] identifier[_nextRecord] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Tokenizer] operator[SEP] identifier[Token] identifier[token] operator[SEP] identifier[String] identifier[s] operator[SEP] Keyword[if] operator[SEP] identifier[included] operator[!=] Other[null] operator[SEP] { identifier[Record] identifier[rec] operator[=] identifier[included] operator[SEP] identifier[nextRecord] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rec] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[rec] operator[SEP] identifier[included] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[generator] operator[!=] Other[null] operator[SEP] { identifier[Record] identifier[rec] operator[=] identifier[nextGenerated] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rec] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[rec] operator[SEP] identifier[endGenerate] operator[SEP] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] literal[boolean] operator[SEP] { identifier[Name] identifier[name] operator[SEP] identifier[token] operator[=] identifier[st] operator[SEP] identifier[get] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[type] operator[==] identifier[Tokenizer] operator[SEP] identifier[WHITESPACE] operator[SEP] { identifier[Tokenizer] operator[SEP] identifier[Token] identifier[next] operator[=] identifier[st] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[next] operator[SEP] identifier[type] operator[==] identifier[Tokenizer] operator[SEP] identifier[EOL] operator[SEP] Keyword[continue] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[next] operator[SEP] identifier[type] operator[==] identifier[Tokenizer] operator[SEP] identifier[EOF] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[else] identifier[st] operator[SEP] identifier[unget] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[last] operator[==] Other[null] operator[SEP] Keyword[throw] identifier[st] operator[SEP] identifier[exception] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[name] operator[=] identifier[last] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[type] operator[==] identifier[Tokenizer] operator[SEP] identifier[EOL] operator[SEP] Keyword[continue] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[type] operator[==] identifier[Tokenizer] operator[SEP] identifier[EOF] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[else] Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[token] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[SEP] { identifier[s] operator[=] identifier[token] operator[SEP] identifier[value] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[origin] operator[=] identifier[st] operator[SEP] identifier[getName] operator[SEP] identifier[Name] operator[SEP] identifier[root] operator[SEP] operator[SEP] identifier[st] operator[SEP] identifier[getEOL] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[defaultTTL] operator[=] identifier[st] operator[SEP] identifier[getTTL] operator[SEP] operator[SEP] operator[SEP] identifier[st] operator[SEP] identifier[getEOL] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[String] identifier[filename] operator[=] identifier[st] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] identifier[File] identifier[newfile] operator[SEP] Keyword[if] operator[SEP] identifier[file] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[parent] operator[=] identifier[file] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] identifier[newfile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[parent] , identifier[filename] operator[SEP] operator[SEP] } Keyword[else] { identifier[newfile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[filename] operator[SEP] operator[SEP] } identifier[Name] identifier[incorigin] operator[=] identifier[origin] operator[SEP] identifier[token] operator[=] identifier[st] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[isString] operator[SEP] operator[SEP] operator[SEP] { identifier[incorigin] operator[=] identifier[parseName] operator[SEP] identifier[token] operator[SEP] identifier[value] , identifier[Name] operator[SEP] identifier[root] operator[SEP] operator[SEP] identifier[st] operator[SEP] identifier[getEOL] operator[SEP] operator[SEP] operator[SEP] } identifier[included] operator[=] Keyword[new] identifier[Master] operator[SEP] identifier[newfile] , identifier[incorigin] , identifier[defaultTTL] operator[SEP] operator[SEP] Keyword[return] identifier[nextRecord] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[generator] operator[!=] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[startGenerate] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[noExpandGenerate] operator[SEP] { identifier[endGenerate] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } Keyword[return] identifier[nextGenerated] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] identifier[st] operator[SEP] identifier[exception] operator[SEP] literal[String] operator[+] identifier[s] operator[SEP] operator[SEP] } } Keyword[else] { identifier[s] operator[=] identifier[token] operator[SEP] identifier[value] operator[SEP] identifier[name] operator[=] identifier[parseName] operator[SEP] identifier[s] , identifier[origin] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[last] operator[!=] Other[null] operator[&&] identifier[name] operator[SEP] identifier[equals] operator[SEP] identifier[last] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[name] operator[=] identifier[last] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] } } identifier[parseTTLClassAndType] operator[SEP] operator[SEP] operator[SEP] identifier[last] operator[=] identifier[Record] operator[SEP] identifier[fromString] operator[SEP] identifier[name] , identifier[currentType] , identifier[currentDClass] , identifier[currentTTL] , identifier[st] , identifier[origin] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[needSOATTL] operator[SEP] { Keyword[long] identifier[ttl] operator[=] operator[SEP] operator[SEP] identifier[SOARecord] operator[SEP] identifier[last] operator[SEP] operator[SEP] identifier[getMinimum] operator[SEP] operator[SEP] operator[SEP] identifier[last] operator[SEP] identifier[setTTL] operator[SEP] identifier[ttl] operator[SEP] operator[SEP] identifier[defaultTTL] operator[=] identifier[ttl] operator[SEP] identifier[needSOATTL] operator[=] literal[boolean] operator[SEP] } Keyword[return] identifier[last] operator[SEP] } }
public void peekExpect(final char expectedChar) throws ParseException { if (position == string.length()) { throw new ParseException(this, "Expected '" + expectedChar + "'; reached end of string"); } final char next = string.charAt(position); if (next != expectedChar) { throw new ParseException(this, "Expected '" + expectedChar + "'; got '" + next + "'"); } }
class class_name[name] begin[{] method[peekExpect, return_type[void], modifier[public], parameter[expectedChar]] begin[{] if[binary_operation[member[.position], ==, call[string.length, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected '"), operandr=MemberReference(member=expectedChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'; reached end of string"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParseException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[char], next] if[binary_operation[member[.next], !=, member[.expectedChar]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected '"), operandr=MemberReference(member=expectedChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'; got '"), operator=+), operandr=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParseException, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[peekExpect] operator[SEP] Keyword[final] Keyword[char] identifier[expectedChar] operator[SEP] Keyword[throws] identifier[ParseException] { Keyword[if] operator[SEP] identifier[position] operator[==] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] Keyword[this] , literal[String] operator[+] identifier[expectedChar] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[final] Keyword[char] identifier[next] operator[=] identifier[string] operator[SEP] identifier[charAt] operator[SEP] identifier[position] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[next] operator[!=] identifier[expectedChar] operator[SEP] { Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] Keyword[this] , literal[String] operator[+] identifier[expectedChar] operator[+] literal[String] operator[+] identifier[next] operator[+] literal[String] operator[SEP] operator[SEP] } }
public VpnConnectionInner get(String resourceGroupName, String gatewayName, String connectionName) { return getWithServiceResponseAsync(resourceGroupName, gatewayName, connectionName).toBlocking().single().body(); }
class class_name[name] begin[{] method[get, return_type[type[VpnConnectionInner]], modifier[public], parameter[resourceGroupName, gatewayName, connectionName]] begin[{] return[call[.getWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.gatewayName], member[.connectionName]]]] end[}] END[}]
Keyword[public] identifier[VpnConnectionInner] identifier[get] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[gatewayName] , identifier[String] identifier[connectionName] operator[SEP] { Keyword[return] identifier[getWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[gatewayName] , identifier[connectionName] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
public void deleteVerifiedEmail(DeleteVerifiedEmailRequest request) { checkNotNull(request, "object request should not be null."); assertStringNotNullOrEmpty(request.getEmailAddress(), "object emailAddress should not be null or empty"); checkIsEmail(request.getEmailAddress()); InternalRequest internalRequest = this.createRequest("verifiedEmail", request, HttpMethodName.DELETE, request.getEmailAddress()); this.invokeHttpClient(internalRequest, SesResponse.class); }
class class_name[name] begin[{] method[deleteVerifiedEmail, return_type[void], modifier[public], parameter[request]] begin[{] call[.checkNotNull, parameter[member[.request], literal["object request should not be null."]]] call[.assertStringNotNullOrEmpty, parameter[call[request.getEmailAddress, parameter[]], literal["object emailAddress should not be null or empty"]]] call[.checkIsEmail, parameter[call[request.getEmailAddress, parameter[]]]] local_variable[type[InternalRequest], internalRequest] THIS[call[None.invokeHttpClient, parameter[member[.internalRequest], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SesResponse, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[deleteVerifiedEmail] operator[SEP] identifier[DeleteVerifiedEmailRequest] identifier[request] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[request] , literal[String] operator[SEP] operator[SEP] identifier[assertStringNotNullOrEmpty] operator[SEP] identifier[request] operator[SEP] identifier[getEmailAddress] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[checkIsEmail] operator[SEP] identifier[request] operator[SEP] identifier[getEmailAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[InternalRequest] identifier[internalRequest] operator[=] Keyword[this] operator[SEP] identifier[createRequest] operator[SEP] literal[String] , identifier[request] , identifier[HttpMethodName] operator[SEP] identifier[DELETE] , identifier[request] operator[SEP] identifier[getEmailAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[invokeHttpClient] operator[SEP] identifier[internalRequest] , identifier[SesResponse] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
@Override public <E> List<E> getColumnsById(String schemaName, String tableName, String pKeyColumnName, String columnName, Object pKeyColumnValue, Class columnJavaType) { Object connection = null; List results = new ArrayList(); try { connection = getConnection(); String valueAsStr = PropertyAccessorHelper.getString(pKeyColumnValue); Double score = getDouble(valueAsStr); Set<String> resultKeys = null; if (resource != null && resource.isActive()) { Response response = ((Transaction) connection).zrangeByScore(getHashKey(tableName, valueAsStr), score, score); // ((Transaction) connection).exec(); ((RedisTransaction) resource).onExecute(((Transaction) connection)); // ((Transaction) // connection).zrangeByScore(getHashKey(tableName, valueAsStr), // score, score); resultKeys = (Set<String>) response.get(); } else { resultKeys = ((Jedis) connection).zrangeByScore(getHashKey(tableName, valueAsStr), score, score); } results = fetchColumn(columnName, connection, results, resultKeys); // return connection.hmget(getEncodedBytes(redisKey), // getEncodedBytes(columnName)); KunderaCoreUtils.printQuery("Get columns by id from:" + tableName + " for column:" + columnName + " where value:" + pKeyColumnValue, showQuery); return results; } finally { onCleanup(connection); } }
class class_name[name] begin[{] method[getColumnsById, return_type[type[List]], modifier[public], parameter[schemaName, tableName, pKeyColumnName, columnName, pKeyColumnValue, columnJavaType]] begin[{] local_variable[type[Object], connection] local_variable[type[List], results] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getConnection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=pKeyColumnValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=PropertyAccessorHelper, selectors=[], type_arguments=None), name=valueAsStr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=valueAsStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDouble, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=score)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Double, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=resultKeys)], 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)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isActive, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[], type_arguments=None), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=resultKeys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Jedis, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Transaction, sub_type=None)), name=response)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Response, sub_type=None)), StatementExpression(expression=Cast(expression=MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=RedisTransaction, sub_type=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=resultKeys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Set, sub_type=None))), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=columnName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resultKeys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fetchColumn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Get columns by id from:"), operandr=MemberReference(member=tableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" for column:"), operator=+), operandr=MemberReference(member=columnName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" where value:"), operator=+), operandr=MemberReference(member=pKeyColumnValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=showQuery, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printQuery, postfix_operators=[], prefix_operators=[], qualifier=KunderaCoreUtils, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onCleanup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[E] operator[>] identifier[List] operator[<] identifier[E] operator[>] identifier[getColumnsById] operator[SEP] identifier[String] identifier[schemaName] , identifier[String] identifier[tableName] , identifier[String] identifier[pKeyColumnName] , identifier[String] identifier[columnName] , identifier[Object] identifier[pKeyColumnValue] , identifier[Class] identifier[columnJavaType] operator[SEP] { identifier[Object] identifier[connection] operator[=] Other[null] operator[SEP] identifier[List] identifier[results] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[connection] operator[=] identifier[getConnection] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[valueAsStr] operator[=] identifier[PropertyAccessorHelper] operator[SEP] identifier[getString] operator[SEP] identifier[pKeyColumnValue] operator[SEP] operator[SEP] identifier[Double] identifier[score] operator[=] identifier[getDouble] operator[SEP] identifier[valueAsStr] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[resultKeys] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[resource] operator[!=] Other[null] operator[&&] identifier[resource] operator[SEP] identifier[isActive] operator[SEP] operator[SEP] operator[SEP] { identifier[Response] identifier[response] operator[=] operator[SEP] operator[SEP] identifier[Transaction] operator[SEP] identifier[connection] operator[SEP] operator[SEP] identifier[zrangeByScore] operator[SEP] identifier[getHashKey] operator[SEP] identifier[tableName] , identifier[valueAsStr] operator[SEP] , identifier[score] , identifier[score] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[RedisTransaction] operator[SEP] identifier[resource] operator[SEP] operator[SEP] identifier[onExecute] operator[SEP] operator[SEP] operator[SEP] identifier[Transaction] operator[SEP] identifier[connection] operator[SEP] operator[SEP] operator[SEP] identifier[resultKeys] operator[=] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] operator[SEP] identifier[response] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[resultKeys] operator[=] operator[SEP] operator[SEP] identifier[Jedis] operator[SEP] identifier[connection] operator[SEP] operator[SEP] identifier[zrangeByScore] operator[SEP] identifier[getHashKey] operator[SEP] identifier[tableName] , identifier[valueAsStr] operator[SEP] , identifier[score] , identifier[score] operator[SEP] operator[SEP] } identifier[results] operator[=] identifier[fetchColumn] operator[SEP] identifier[columnName] , identifier[connection] , identifier[results] , identifier[resultKeys] operator[SEP] operator[SEP] identifier[KunderaCoreUtils] operator[SEP] identifier[printQuery] operator[SEP] literal[String] operator[+] identifier[tableName] operator[+] literal[String] operator[+] identifier[columnName] operator[+] literal[String] operator[+] identifier[pKeyColumnValue] , identifier[showQuery] operator[SEP] operator[SEP] Keyword[return] identifier[results] operator[SEP] } Keyword[finally] { identifier[onCleanup] operator[SEP] identifier[connection] operator[SEP] operator[SEP] } }
public ResultSet getAttributes(final String catalog, final String schemaPattern, final String typeNamePattern, final String attributeNamePattern) throws SQLException { return RowLists.rowList21(String.class, String.class, String.class, String.class, Integer.class, String.class, Integer.class, Integer.class, Integer.class, Integer.class, String.class, String.class, Integer.class, Integer.class, Integer.class, Integer.class, String.class, String.class, String.class, String.class, Short.class). withLabel(1, "TYPE_CAT"). withLabel(2, "TYPE_SCHEM"). withLabel(3, "TYPE_NAME"). withLabel(4, "ATTR_NAME"). withLabel(5, "DATA_TYPE"). withLabel(6, "ATTR_TYPE_NAME"). withLabel(7, "ATTR_SIZE"). withLabel(8, "DECIMAL_DIGITS"). withLabel(9, "NUM_PREC_RADIX"). withLabel(10, "NULLABLE"). withLabel(11, "REMARKS"). withLabel(12, "ATTR_DEF"). withLabel(13, "SQL_DATA_TYPE"). withLabel(14, "SQL_DATETIME_SUB"). withLabel(15, "CHAR_OCTET_LENGTH"). withLabel(16, "ORDINAL_POSITION"). withLabel(17, "IS_NULLABLE"). withLabel(18, "SCOPE_CATLOG"). withLabel(19, "SCOPE_SCHEMA"). withLabel(20, "SCOPE_TABLE"). withLabel(21, "SOURCE_DATA_TYPE"). resultSet(); }
class class_name[name] begin[{] method[getAttributes, return_type[type[ResultSet]], modifier[public], parameter[catalog, schemaPattern, typeNamePattern, attributeNamePattern]] begin[{] return[call[RowLists.rowList21, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Short, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[ResultSet] identifier[getAttributes] operator[SEP] Keyword[final] identifier[String] identifier[catalog] , Keyword[final] identifier[String] identifier[schemaPattern] , Keyword[final] identifier[String] identifier[typeNamePattern] , Keyword[final] identifier[String] identifier[attributeNamePattern] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[return] identifier[RowLists] operator[SEP] identifier[rowList21] operator[SEP] identifier[String] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[Integer] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[Integer] operator[SEP] Keyword[class] , identifier[Integer] operator[SEP] Keyword[class] , identifier[Integer] operator[SEP] Keyword[class] , identifier[Integer] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[Integer] operator[SEP] Keyword[class] , identifier[Integer] operator[SEP] Keyword[class] , identifier[Integer] operator[SEP] Keyword[class] , identifier[Integer] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , identifier[Short] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[1] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[2] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[3] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[4] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[5] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[6] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[7] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[8] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[9] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[10] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[11] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[12] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[13] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[14] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[15] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[16] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[17] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[18] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[19] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[20] , literal[String] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] Other[21] , literal[String] operator[SEP] operator[SEP] identifier[resultSet] operator[SEP] operator[SEP] operator[SEP] }
public ActivityImpl parseScriptTask(Element scriptTaskElement, ScopeImpl scope) { ActivityImpl activity = createActivityOnScope(scriptTaskElement, scope); ScriptTaskActivityBehavior activityBehavior = parseScriptTaskElement(scriptTaskElement); if (activityBehavior != null) { parseAsynchronousContinuationForActivity(scriptTaskElement, activity); activity.setActivityBehavior(activityBehavior); parseExecutionListenersOnScope(scriptTaskElement, activity); for (BpmnParseListener parseListener : parseListeners) { parseListener.parseScriptTask(scriptTaskElement, scope, activity); } } return activity; }
class class_name[name] begin[{] method[parseScriptTask, return_type[type[ActivityImpl]], modifier[public], parameter[scriptTaskElement, scope]] begin[{] local_variable[type[ActivityImpl], activity] local_variable[type[ScriptTaskActivityBehavior], activityBehavior] if[binary_operation[member[.activityBehavior], !=, literal[null]]] begin[{] call[.parseAsynchronousContinuationForActivity, parameter[member[.scriptTaskElement], member[.activity]]] call[activity.setActivityBehavior, parameter[member[.activityBehavior]]] call[.parseExecutionListenersOnScope, parameter[member[.scriptTaskElement], member[.activity]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=scriptTaskElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=scope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=activity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseScriptTask, postfix_operators=[], prefix_operators=[], qualifier=parseListener, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=parseListeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=parseListener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BpmnParseListener, sub_type=None))), label=None) else begin[{] None end[}] return[member[.activity]] end[}] END[}]
Keyword[public] identifier[ActivityImpl] identifier[parseScriptTask] operator[SEP] identifier[Element] identifier[scriptTaskElement] , identifier[ScopeImpl] identifier[scope] operator[SEP] { identifier[ActivityImpl] identifier[activity] operator[=] identifier[createActivityOnScope] operator[SEP] identifier[scriptTaskElement] , identifier[scope] operator[SEP] operator[SEP] identifier[ScriptTaskActivityBehavior] identifier[activityBehavior] operator[=] identifier[parseScriptTaskElement] operator[SEP] identifier[scriptTaskElement] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[activityBehavior] operator[!=] Other[null] operator[SEP] { identifier[parseAsynchronousContinuationForActivity] operator[SEP] identifier[scriptTaskElement] , identifier[activity] operator[SEP] operator[SEP] identifier[activity] operator[SEP] identifier[setActivityBehavior] operator[SEP] identifier[activityBehavior] operator[SEP] operator[SEP] identifier[parseExecutionListenersOnScope] operator[SEP] identifier[scriptTaskElement] , identifier[activity] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[BpmnParseListener] identifier[parseListener] operator[:] identifier[parseListeners] operator[SEP] { identifier[parseListener] operator[SEP] identifier[parseScriptTask] operator[SEP] identifier[scriptTaskElement] , identifier[scope] , identifier[activity] operator[SEP] operator[SEP] } } Keyword[return] identifier[activity] operator[SEP] }
protected static boolean __has_identifier(ByteBuffer bb, String ident) { if (ident.length() != FILE_IDENTIFIER_LENGTH) throw new AssertionError("FlatBuffers: file identifier must be length " + FILE_IDENTIFIER_LENGTH); for (int i = 0; i < FILE_IDENTIFIER_LENGTH; i++) { if (ident.charAt(i) != (char)bb.get(bb.position() + SIZEOF_INT + i)) return false; } return true; }
class class_name[name] begin[{] method[__has_identifier, return_type[type[boolean]], modifier[static protected], parameter[bb, ident]] begin[{] if[binary_operation[call[ident.length, parameter[]], !=, member[.FILE_IDENTIFIER_LENGTH]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="FlatBuffers: file identifier must be length "), operandr=MemberReference(member=FILE_IDENTIFIER_LENGTH, 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=AssertionError, sub_type=None)), label=None) else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=ident, selectors=[], type_arguments=None), operandr=Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=position, postfix_operators=[], prefix_operators=[], qualifier=bb, selectors=[], type_arguments=None), operandr=MemberReference(member=SIZEOF_INT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=get, postfix_operators=[], prefix_operators=[], qualifier=bb, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=char)), operator=!=), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=FILE_IDENTIFIER_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[literal[true]] end[}] END[}]
Keyword[protected] Keyword[static] Keyword[boolean] identifier[__has_identifier] operator[SEP] identifier[ByteBuffer] identifier[bb] , identifier[String] identifier[ident] operator[SEP] { Keyword[if] operator[SEP] identifier[ident] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] identifier[FILE_IDENTIFIER_LENGTH] operator[SEP] Keyword[throw] Keyword[new] identifier[AssertionError] operator[SEP] literal[String] operator[+] identifier[FILE_IDENTIFIER_LENGTH] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[FILE_IDENTIFIER_LENGTH] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[ident] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[!=] operator[SEP] Keyword[char] operator[SEP] identifier[bb] operator[SEP] identifier[get] operator[SEP] identifier[bb] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[+] identifier[SIZEOF_INT] operator[+] identifier[i] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static IElectronContainer[] getElectronContainerArray(IAtomContainer container) { IElectronContainer[] ret = new IElectronContainer[container.getElectronContainerCount()]; for (int i = 0; i < ret.length; ++i) ret[i] = container.getElectronContainer(i); return ret; }
class class_name[name] begin[{] method[getElectronContainerArray, return_type[type[IElectronContainer]], modifier[public static], parameter[container]] begin[{] local_variable[type[IElectronContainer], ret] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=ret, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getElectronContainer, postfix_operators=[], prefix_operators=[], qualifier=container, 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=ret, 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[.ret]] end[}] END[}]
Keyword[public] Keyword[static] identifier[IElectronContainer] operator[SEP] operator[SEP] identifier[getElectronContainerArray] operator[SEP] identifier[IAtomContainer] identifier[container] operator[SEP] { identifier[IElectronContainer] operator[SEP] operator[SEP] identifier[ret] operator[=] Keyword[new] identifier[IElectronContainer] operator[SEP] identifier[container] operator[SEP] identifier[getElectronContainerCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[ret] operator[SEP] identifier[length] operator[SEP] operator[++] identifier[i] operator[SEP] identifier[ret] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[container] operator[SEP] identifier[getElectronContainer] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] }
public void bindCommand(Control control, Command command) { commands.put(control, command); if (commandState.get(command) == null) { commandState.put(command, new CommandState()); } }
class class_name[name] begin[{] method[bindCommand, return_type[void], modifier[public], parameter[control, command]] begin[{] call[commands.put, parameter[member[.control], member[.command]]] if[binary_operation[call[commandState.get, parameter[member[.command]]], ==, literal[null]]] begin[{] call[commandState.put, parameter[member[.command], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CommandState, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[bindCommand] operator[SEP] identifier[Control] identifier[control] , identifier[Command] identifier[command] operator[SEP] { identifier[commands] operator[SEP] identifier[put] operator[SEP] identifier[control] , identifier[command] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[commandState] operator[SEP] identifier[get] operator[SEP] identifier[command] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[commandState] operator[SEP] identifier[put] operator[SEP] identifier[command] , Keyword[new] identifier[CommandState] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public CmsGroup readGroup(CmsDbContext dbc, CmsProject project) { try { return readGroup(dbc, project.getGroupId()); } catch (CmsException exc) { return new CmsGroup( CmsUUID.getNullUUID(), CmsUUID.getNullUUID(), project.getGroupId() + "", "deleted group", 0); } }
class class_name[name] begin[{] method[readGroup, return_type[type[CmsGroup]], modifier[public], parameter[dbc, project]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=dbc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getGroupId, postfix_operators=[], prefix_operators=[], qualifier=project, selectors=[], type_arguments=None)], member=readGroup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getNullUUID, postfix_operators=[], prefix_operators=[], qualifier=CmsUUID, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getNullUUID, postfix_operators=[], prefix_operators=[], qualifier=CmsUUID, selectors=[], type_arguments=None), BinaryOperation(operandl=MethodInvocation(arguments=[], member=getGroupId, postfix_operators=[], prefix_operators=[], qualifier=project, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="deleted group"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmsGroup, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exc, types=['CmsException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[CmsGroup] identifier[readGroup] operator[SEP] identifier[CmsDbContext] identifier[dbc] , identifier[CmsProject] identifier[project] operator[SEP] { Keyword[try] { Keyword[return] identifier[readGroup] operator[SEP] identifier[dbc] , identifier[project] operator[SEP] identifier[getGroupId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CmsException] identifier[exc] operator[SEP] { Keyword[return] Keyword[new] identifier[CmsGroup] operator[SEP] identifier[CmsUUID] operator[SEP] identifier[getNullUUID] operator[SEP] operator[SEP] , identifier[CmsUUID] operator[SEP] identifier[getNullUUID] operator[SEP] operator[SEP] , identifier[project] operator[SEP] identifier[getGroupId] operator[SEP] operator[SEP] operator[+] literal[String] , literal[String] , Other[0] operator[SEP] operator[SEP] } }
private void processAttribute(CValuePropertyInfo property, ClassOutline clase, Outline model) { FieldOutline field = model.getField(property); String propertyName = property.getName(false); String className = clase.implClass.name(); log("Attribute " + propertyName + " added to class " + className); XSComponent definition = property.getSchemaComponent(); RestrictionSimpleTypeImpl particle = (RestrictionSimpleTypeImpl) definition; XSSimpleType type = particle.asSimpleType(); JFieldVar var = clase.implClass.fields().get(propertyName); // if (particle.isRequired()) { // if (!hasAnnotation(var, NotNull.class)) { // if (notNullAnnotations) { // System.out.println("@NotNull: " + propertyName + " added to class " + className); // var.annotate(NotNull.class); // } // } // } validAnnotation(type, var, propertyName, className); processType(type, var, propertyName, className); }
class class_name[name] begin[{] method[processAttribute, return_type[void], modifier[private], parameter[property, clase, model]] begin[{] local_variable[type[FieldOutline], field] local_variable[type[String], propertyName] local_variable[type[String], className] call[.log, parameter[binary_operation[binary_operation[binary_operation[literal["Attribute "], +, member[.propertyName]], +, literal[" added to class "]], +, member[.className]]]] local_variable[type[XSComponent], definition] local_variable[type[RestrictionSimpleTypeImpl], particle] local_variable[type[XSSimpleType], type] local_variable[type[JFieldVar], var] call[.validAnnotation, parameter[member[.type], member[.var], member[.propertyName], member[.className]]] call[.processType, parameter[member[.type], member[.var], member[.propertyName], member[.className]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[processAttribute] operator[SEP] identifier[CValuePropertyInfo] identifier[property] , identifier[ClassOutline] identifier[clase] , identifier[Outline] identifier[model] operator[SEP] { identifier[FieldOutline] identifier[field] operator[=] identifier[model] operator[SEP] identifier[getField] operator[SEP] identifier[property] operator[SEP] operator[SEP] identifier[String] identifier[propertyName] operator[=] identifier[property] operator[SEP] identifier[getName] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[String] identifier[className] operator[=] identifier[clase] operator[SEP] identifier[implClass] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] literal[String] operator[+] identifier[propertyName] operator[+] literal[String] operator[+] identifier[className] operator[SEP] operator[SEP] identifier[XSComponent] identifier[definition] operator[=] identifier[property] operator[SEP] identifier[getSchemaComponent] operator[SEP] operator[SEP] operator[SEP] identifier[RestrictionSimpleTypeImpl] identifier[particle] operator[=] operator[SEP] identifier[RestrictionSimpleTypeImpl] operator[SEP] identifier[definition] operator[SEP] identifier[XSSimpleType] identifier[type] operator[=] identifier[particle] operator[SEP] identifier[asSimpleType] operator[SEP] operator[SEP] operator[SEP] identifier[JFieldVar] identifier[var] operator[=] identifier[clase] operator[SEP] identifier[implClass] operator[SEP] identifier[fields] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] identifier[validAnnotation] operator[SEP] identifier[type] , identifier[var] , identifier[propertyName] , identifier[className] operator[SEP] operator[SEP] identifier[processType] operator[SEP] identifier[type] , identifier[var] , identifier[propertyName] , identifier[className] operator[SEP] operator[SEP] }
public void addIsland(Island isl) { if (LOG.isLoggable(Level.FINE)) { LOG.log(Level.FINE, "adding island: '{0}'", isl); } for (Coordinate coordinate : isl) { fixedRows.add(coordinate.row); fixedVertices.add(table.vertexAt(coordinate.row, coordinate.column)); } fixedIslands.add(isl); islandMultimap.computeIfPresent(isl.size(), (s, i) -> { i.remove(isl); return (i.isEmpty() ? null : i); }); }
class class_name[name] begin[{] method[addIsland, return_type[void], modifier[public], parameter[isl]] begin[{] if[call[LOG.isLoggable, parameter[member[Level.FINE]]]] begin[{] call[LOG.log, parameter[member[Level.FINE], literal["adding island: '{0}'"], member[.isl]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=coordinate, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=fixedRows, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=coordinate, selectors=[]), MemberReference(member=column, postfix_operators=[], prefix_operators=[], qualifier=coordinate, selectors=[])], member=vertexAt, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=fixedVertices, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=isl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=coordinate)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Coordinate, sub_type=None))), label=None) call[fixedIslands.add, parameter[member[.isl]]] call[islandMultimap.computeIfPresent, parameter[call[isl.size, parameter[]], LambdaExpression(body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=isl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), if_false=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], parameters=[InferredFormalParameter(name=s), InferredFormalParameter(name=i)])]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addIsland] operator[SEP] identifier[Island] identifier[isl] operator[SEP] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , literal[String] , identifier[isl] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Coordinate] identifier[coordinate] operator[:] identifier[isl] operator[SEP] { identifier[fixedRows] operator[SEP] identifier[add] operator[SEP] identifier[coordinate] operator[SEP] identifier[row] operator[SEP] operator[SEP] identifier[fixedVertices] operator[SEP] identifier[add] operator[SEP] identifier[table] operator[SEP] identifier[vertexAt] operator[SEP] identifier[coordinate] operator[SEP] identifier[row] , identifier[coordinate] operator[SEP] identifier[column] operator[SEP] operator[SEP] operator[SEP] } identifier[fixedIslands] operator[SEP] identifier[add] operator[SEP] identifier[isl] operator[SEP] operator[SEP] identifier[islandMultimap] operator[SEP] identifier[computeIfPresent] operator[SEP] identifier[isl] operator[SEP] identifier[size] operator[SEP] operator[SEP] , operator[SEP] identifier[s] , identifier[i] operator[SEP] operator[->] { identifier[i] operator[SEP] identifier[remove] operator[SEP] identifier[isl] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[i] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[i] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] }
public void reset() { Lock lock = this.lock.writeLock(); lock.lock(); try { doReset(); } finally { lock.unlock(); } }
class class_name[name] begin[{] method[reset, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[Lock], lock] call[lock.lock, parameter[]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=doReset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[reset] operator[SEP] operator[SEP] { identifier[Lock] identifier[lock] operator[=] Keyword[this] operator[SEP] identifier[lock] operator[SEP] identifier[writeLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[doReset] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[lock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
public double[] Kernel1D(int size) { if (((size % 2) == 0) || (size < 3) || (size > 101)) { try { throw new Exception("Wrong size"); } catch (Exception e) { e.printStackTrace(); } } int r = size / 2; // kernel double[] kernel = new double[size]; // compute kernel for (int x = -r, i = 0; i < size; x++, i++) { kernel[i] = Function1D(x); } return kernel; }
class class_name[name] begin[{] method[Kernel1D, return_type[type[double]], modifier[public], parameter[size]] begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.size], %, literal[2]], ==, literal[0]], ||, binary_operation[member[.size], <, literal[3]]], ||, binary_operation[member[.size], >, literal[101]]]] begin[{] TryStatement(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Wrong size")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] local_variable[type[int], r] local_variable[type[double], kernel] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=kernel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=Function1D, 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=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=r, postfix_operators=[], prefix_operators=['-'], qualifier=, selectors=[]), name=x), VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=x, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.kernel]] end[}] END[}]
Keyword[public] Keyword[double] operator[SEP] operator[SEP] identifier[Kernel1D] operator[SEP] Keyword[int] identifier[size] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[%] Other[2] operator[SEP] operator[==] Other[0] operator[SEP] operator[||] operator[SEP] identifier[size] operator[<] Other[3] operator[SEP] operator[||] operator[SEP] identifier[size] operator[>] Other[101] operator[SEP] operator[SEP] { Keyword[try] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } } Keyword[int] identifier[r] operator[=] identifier[size] operator[/] Other[2] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[kernel] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[size] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[x] operator[=] operator[-] identifier[r] , identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[size] operator[SEP] identifier[x] operator[++] , identifier[i] operator[++] operator[SEP] { identifier[kernel] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[Function1D] operator[SEP] identifier[x] operator[SEP] operator[SEP] } Keyword[return] identifier[kernel] operator[SEP] }
private static int matchStringUntilLimitPart( MessagePattern pattern, int partIndex, int limitPartIndex, String source, int sourceOffset) { int matchingSourceLength = 0; String msgString = pattern.getPatternString(); int prevIndex = pattern.getPart(partIndex).getLimit(); for (;;) { Part part = pattern.getPart(++partIndex); if (partIndex == limitPartIndex || part.getType() == Part.Type.SKIP_SYNTAX) { int index = part.getIndex(); int length = index - prevIndex; if (length != 0 && !source.regionMatches(sourceOffset, msgString, prevIndex, length)) { return -1; // mismatch } matchingSourceLength += length; if (partIndex == limitPartIndex) { return matchingSourceLength; } prevIndex = part.getLimit(); // SKIP_SYNTAX } } }
class class_name[name] begin[{] method[matchStringUntilLimitPart, return_type[type[int]], modifier[private static], parameter[pattern, partIndex, limitPartIndex, source, sourceOffset]] begin[{] local_variable[type[int], matchingSourceLength] local_variable[type[String], msgString] local_variable[type[int], prevIndex] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=partIndex, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])], member=getPart, postfix_operators=[], prefix_operators=[], qualifier=pattern, selectors=[], type_arguments=None), name=part)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Part, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=partIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=limitPartIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=part, selectors=[], type_arguments=None), operandr=MemberReference(member=SKIP_SYNTAX, postfix_operators=[], prefix_operators=[], qualifier=Part.Type, selectors=[]), operator===), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getIndex, postfix_operators=[], prefix_operators=[], qualifier=part, selectors=[], type_arguments=None), name=index)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=prevIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), name=length)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=sourceOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msgString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=prevIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=regionMatches, postfix_operators=[], prefix_operators=['!'], qualifier=source, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=matchingSourceLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=partIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=limitPartIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=matchingSourceLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=prevIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getLimit, postfix_operators=[], prefix_operators=[], qualifier=part, selectors=[], type_arguments=None)), label=None)]))]), control=ForControl(condition=None, init=None, update=None), label=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[int] identifier[matchStringUntilLimitPart] operator[SEP] identifier[MessagePattern] identifier[pattern] , Keyword[int] identifier[partIndex] , Keyword[int] identifier[limitPartIndex] , identifier[String] identifier[source] , Keyword[int] identifier[sourceOffset] operator[SEP] { Keyword[int] identifier[matchingSourceLength] operator[=] Other[0] operator[SEP] identifier[String] identifier[msgString] operator[=] identifier[pattern] operator[SEP] identifier[getPatternString] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[prevIndex] operator[=] identifier[pattern] operator[SEP] identifier[getPart] operator[SEP] identifier[partIndex] operator[SEP] operator[SEP] identifier[getLimit] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[Part] identifier[part] operator[=] identifier[pattern] operator[SEP] identifier[getPart] operator[SEP] operator[++] identifier[partIndex] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[partIndex] operator[==] identifier[limitPartIndex] operator[||] identifier[part] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[Part] operator[SEP] identifier[Type] operator[SEP] identifier[SKIP_SYNTAX] operator[SEP] { Keyword[int] identifier[index] operator[=] identifier[part] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[length] operator[=] identifier[index] operator[-] identifier[prevIndex] operator[SEP] Keyword[if] operator[SEP] identifier[length] operator[!=] Other[0] operator[&&] operator[!] identifier[source] operator[SEP] identifier[regionMatches] operator[SEP] identifier[sourceOffset] , identifier[msgString] , identifier[prevIndex] , identifier[length] operator[SEP] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } identifier[matchingSourceLength] operator[+=] identifier[length] operator[SEP] Keyword[if] operator[SEP] identifier[partIndex] operator[==] identifier[limitPartIndex] operator[SEP] { Keyword[return] identifier[matchingSourceLength] operator[SEP] } identifier[prevIndex] operator[=] identifier[part] operator[SEP] identifier[getLimit] operator[SEP] operator[SEP] operator[SEP] } } }
public Range<C> canonical(DiscreteDomain<C> domain) { checkNotNull(domain); Cut<C> lower = lowerBound.canonical(domain); Cut<C> upper = upperBound.canonical(domain); return (lower == lowerBound && upper == upperBound) ? this : create(lower, upper); }
class class_name[name] begin[{] method[canonical, return_type[type[Range]], modifier[public], parameter[domain]] begin[{] call[.checkNotNull, parameter[member[.domain]]] local_variable[type[Cut], lower] local_variable[type[Cut], upper] return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=lower, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=lowerBound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=upper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=upperBound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), if_false=MethodInvocation(arguments=[MemberReference(member=lower, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=upper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=create, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_true=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]))] end[}] END[}]
Keyword[public] identifier[Range] operator[<] identifier[C] operator[>] identifier[canonical] operator[SEP] identifier[DiscreteDomain] operator[<] identifier[C] operator[>] identifier[domain] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[domain] operator[SEP] operator[SEP] identifier[Cut] operator[<] identifier[C] operator[>] identifier[lower] operator[=] identifier[lowerBound] operator[SEP] identifier[canonical] operator[SEP] identifier[domain] operator[SEP] operator[SEP] identifier[Cut] operator[<] identifier[C] operator[>] identifier[upper] operator[=] identifier[upperBound] operator[SEP] identifier[canonical] operator[SEP] identifier[domain] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[lower] operator[==] identifier[lowerBound] operator[&&] identifier[upper] operator[==] identifier[upperBound] operator[SEP] operator[?] Keyword[this] operator[:] identifier[create] operator[SEP] identifier[lower] , identifier[upper] operator[SEP] operator[SEP] }
public Matrix transpose() { final Matrix A = new Matrix(m_columns, m_rows); for (int i = 0; i < m_rows; i++) { for (int j = 0; j < m_columns; j++) { A.m_data[j][i] = this.m_data[i][j]; } } return A; }
class class_name[name] begin[{] method[transpose, return_type[type[Matrix]], modifier[public], parameter[]] begin[{] local_variable[type[Matrix], A] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_data, postfix_operators=[], prefix_operators=[], qualifier=A, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=m_data, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=m_columns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=m_rows, 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[.A]] end[}] END[}]
Keyword[public] identifier[Matrix] identifier[transpose] operator[SEP] operator[SEP] { Keyword[final] identifier[Matrix] identifier[A] operator[=] Keyword[new] identifier[Matrix] operator[SEP] identifier[m_columns] , identifier[m_rows] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[m_rows] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[m_columns] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[A] operator[SEP] identifier[m_data] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[this] operator[SEP] identifier[m_data] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[SEP] } } Keyword[return] identifier[A] operator[SEP] }
@Override public Object callWithNamedValues(Config config, Key methodName, Struct arguments) throws PageException { try { if (callWithNamedValues == null) callWithNamedValues = clazz.getMethod("callWithNamedValues", new Class[] { Config.class, Key.class, Struct.class }); return callWithNamedValues.invoke(obj, new Object[] { config, methodName, arguments }); } catch (Exception e) { throw Caster.toPageException(e); } }
class class_name[name] begin[{] method[callWithNamedValues, return_type[type[Object]], modifier[public], parameter[config, methodName, arguments]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=callWithNamedValues, 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=callWithNamedValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="callWithNamedValues"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Config, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Key, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Struct, sub_type=None))]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Class, sub_type=None))], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None)), label=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=arguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=callWithNamedValues, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toPageException, postfix_operators=[], prefix_operators=[], qualifier=Caster, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[callWithNamedValues] operator[SEP] identifier[Config] identifier[config] , identifier[Key] identifier[methodName] , identifier[Struct] identifier[arguments] operator[SEP] Keyword[throws] identifier[PageException] { Keyword[try] { Keyword[if] operator[SEP] identifier[callWithNamedValues] operator[==] Other[null] operator[SEP] identifier[callWithNamedValues] operator[=] identifier[clazz] operator[SEP] identifier[getMethod] operator[SEP] literal[String] , Keyword[new] identifier[Class] operator[SEP] operator[SEP] { identifier[Config] operator[SEP] Keyword[class] , identifier[Key] operator[SEP] Keyword[class] , identifier[Struct] operator[SEP] Keyword[class] } operator[SEP] operator[SEP] Keyword[return] identifier[callWithNamedValues] operator[SEP] identifier[invoke] operator[SEP] identifier[obj] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[config] , identifier[methodName] , identifier[arguments] } operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] identifier[Caster] operator[SEP] identifier[toPageException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public void init() { numLabels = model.data.numLabels(); numFeatures = model.feaGen.numFeatures(); if (numLabels <= 0 || numFeatures <= 0) { System.out.println("Invalid number of labels or features"); return; } lambda = model.lambda; tempLambda = new double[numFeatures]; gradLogLi = new double[numFeatures]; diag = new double[numFeatures]; temp = new double[numLabels]; int wsSize = numFeatures * (2 * model.option.mForHessian + 1) + 2 * model.option.mForHessian; ws = new double[wsSize]; iprint = new int[2]; iflag = new int[1]; }
class class_name[name] begin[{] method[init, return_type[void], modifier[public], parameter[]] begin[{] assign[member[.numLabels], call[model.data.numLabels, parameter[]]] assign[member[.numFeatures], call[model.feaGen.numFeatures, parameter[]]] if[binary_operation[binary_operation[member[.numLabels], <=, literal[0]], ||, binary_operation[member[.numFeatures], <=, literal[0]]]] begin[{] call[System.out.println, parameter[literal["Invalid number of labels or features"]]] return[None] else begin[{] None end[}] assign[member[.lambda], member[model.lambda]] assign[member[.tempLambda], ArrayCreator(dimensions=[MemberReference(member=numFeatures, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=double))] assign[member[.gradLogLi], ArrayCreator(dimensions=[MemberReference(member=numFeatures, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=double))] assign[member[.diag], ArrayCreator(dimensions=[MemberReference(member=numFeatures, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=double))] assign[member[.temp], ArrayCreator(dimensions=[MemberReference(member=numLabels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=double))] local_variable[type[int], wsSize] assign[member[.ws], ArrayCreator(dimensions=[MemberReference(member=wsSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=double))] assign[member[.iprint], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] assign[member[.iflag], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] end[}] END[}]
Keyword[public] Keyword[void] identifier[init] operator[SEP] operator[SEP] { identifier[numLabels] operator[=] identifier[model] operator[SEP] identifier[data] operator[SEP] identifier[numLabels] operator[SEP] operator[SEP] operator[SEP] identifier[numFeatures] operator[=] identifier[model] operator[SEP] identifier[feaGen] operator[SEP] identifier[numFeatures] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[numLabels] operator[<=] Other[0] operator[||] identifier[numFeatures] operator[<=] Other[0] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[lambda] operator[=] identifier[model] operator[SEP] identifier[lambda] operator[SEP] identifier[tempLambda] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[numFeatures] operator[SEP] operator[SEP] identifier[gradLogLi] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[numFeatures] operator[SEP] operator[SEP] identifier[diag] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[numFeatures] operator[SEP] operator[SEP] identifier[temp] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[numLabels] operator[SEP] operator[SEP] Keyword[int] identifier[wsSize] operator[=] identifier[numFeatures] operator[*] operator[SEP] Other[2] operator[*] identifier[model] operator[SEP] identifier[option] operator[SEP] identifier[mForHessian] operator[+] Other[1] operator[SEP] operator[+] Other[2] operator[*] identifier[model] operator[SEP] identifier[option] operator[SEP] identifier[mForHessian] operator[SEP] identifier[ws] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[wsSize] operator[SEP] operator[SEP] identifier[iprint] operator[=] Keyword[new] Keyword[int] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[iflag] operator[=] Keyword[new] Keyword[int] operator[SEP] Other[1] operator[SEP] operator[SEP] }
private Date[] getBeforeDays(int year, int month) { Calendar cal = Calendar.getInstance(); cal.set(year, month, 1); int dayNum = getDayIndex(year, month, 1) - 1; Date[] date = new Date[dayNum]; if (dayNum > 0) for (int i = 0; i < dayNum; i++) { cal.add(Calendar.DAY_OF_MONTH, -1); date[i] = cal.getTime(); } return date; }
class class_name[name] begin[{] method[getBeforeDays, return_type[type[Date]], modifier[private], parameter[year, month]] begin[{] local_variable[type[Calendar], cal] call[cal.set, parameter[member[.year], member[.month], literal[1]]] local_variable[type[int], dayNum] local_variable[type[Date], date] if[binary_operation[member[.dayNum], >, literal[0]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=DAY_OF_MONTH, postfix_operators=[], prefix_operators=[], qualifier=Calendar, selectors=[]), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], member=add, postfix_operators=[], prefix_operators=[], qualifier=cal, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=date, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[], member=getTime, postfix_operators=[], prefix_operators=[], qualifier=cal, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dayNum, 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) else begin[{] None end[}] return[member[.date]] end[}] END[}]
Keyword[private] identifier[Date] operator[SEP] operator[SEP] identifier[getBeforeDays] operator[SEP] Keyword[int] identifier[year] , Keyword[int] identifier[month] operator[SEP] { identifier[Calendar] identifier[cal] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[cal] operator[SEP] identifier[set] operator[SEP] identifier[year] , identifier[month] , Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[dayNum] operator[=] identifier[getDayIndex] operator[SEP] identifier[year] , identifier[month] , Other[1] operator[SEP] operator[-] Other[1] operator[SEP] identifier[Date] operator[SEP] operator[SEP] identifier[date] operator[=] Keyword[new] identifier[Date] operator[SEP] identifier[dayNum] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dayNum] operator[>] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[dayNum] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[cal] operator[SEP] identifier[add] operator[SEP] identifier[Calendar] operator[SEP] identifier[DAY_OF_MONTH] , operator[-] Other[1] operator[SEP] operator[SEP] identifier[date] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[cal] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[date] operator[SEP] }
public void clear() { queue.clear(); if (listener != null) { for (V item : map.values()) { listener.onRemove(item); } } map.clear(); }
class class_name[name] begin[{] method[clear, return_type[void], modifier[public], parameter[]] begin[{] call[queue.clear, parameter[]] if[binary_operation[member[.listener], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onRemove, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=item)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))), label=None) else begin[{] None end[}] call[map.clear, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[clear] operator[SEP] operator[SEP] { identifier[queue] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[listener] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[V] identifier[item] operator[:] identifier[map] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[listener] operator[SEP] identifier[onRemove] operator[SEP] identifier[item] operator[SEP] operator[SEP] } } identifier[map] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] }
public void writeBytes(byte[] bytes, int len) throws IOException { outputBytes(bytes, 0, len); if(this.checksummode.enabled(ChecksumMode.DAP)) { this.checksum.update(bytes, 0, len); if(DUMPCSUM) { System.err.print("SSS "); for(int i = 0; i < len; i++) { System.err.printf("%02x", bytes[i]); } System.err.println(); } } }
class class_name[name] begin[{] method[writeBytes, return_type[void], modifier[public], parameter[bytes, len]] begin[{] call[.outputBytes, parameter[member[.bytes], literal[0], member[.len]]] if[THIS[member[None.checksummode]call[None.enabled, parameter[member[ChecksumMode.DAP]]]]] begin[{] THIS[member[None.checksum]call[None.update, parameter[member[.bytes], literal[0], member[.len]]]] if[member[.DUMPCSUM]] begin[{] call[System.err.print, parameter[literal["SSS "]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="%02x"), MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=printf, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, 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) call[System.err.println, parameter[]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[writeBytes] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] , Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] { identifier[outputBytes] operator[SEP] identifier[bytes] , Other[0] , identifier[len] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[checksummode] operator[SEP] identifier[enabled] operator[SEP] identifier[ChecksumMode] operator[SEP] identifier[DAP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[checksum] operator[SEP] identifier[update] operator[SEP] identifier[bytes] , Other[0] , identifier[len] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[DUMPCSUM] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[print] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[len] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[printf] operator[SEP] literal[String] , identifier[bytes] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] } } }
public void addConfigurationParameter(String param, String value, String type, String category, String name, String chain, boolean recursive) throws Exception { long startTime = System.currentTimeMillis(); Exception exception = null; if (cfg.exists()) { userDir = new File(System.getProperty("user.dir")).getAbsolutePath(); System.setProperty("user.dir", options.getExecutionDirectory().getAbsolutePath()); try { ConfigurationManager manager = new ConfigurationManager(cfg, false); manager.getProjectConfigurationProvider().addConfigurationParameter(param, value, type, category, name, chain, recursive); } catch (Exception e) { exception = e; } finally { System.setProperty("user.dir", userDir); updateMsg(startTime, exception); } } }
class class_name[name] begin[{] method[addConfigurationParameter, return_type[void], modifier[public], parameter[param, value, type, category, name, chain, recursive]] begin[{] local_variable[type[long], startTime] local_variable[type[Exception], exception] if[call[cfg.exists, parameter[]]] begin[{] assign[member[.userDir], ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="user.dir")], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] call[System.setProperty, parameter[literal["user.dir"], call[options.getExecutionDirectory, parameter[]]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=cfg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ConfigurationManager, sub_type=None)), name=manager)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ConfigurationManager, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getProjectConfigurationProvider, postfix_operators=[], prefix_operators=[], qualifier=manager, selectors=[MethodInvocation(arguments=[MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=category, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=chain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=recursive, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addConfigurationParameter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=exception, 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=['Exception']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="user.dir"), MemberReference(member=userDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setProperty, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=startTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=updateMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addConfigurationParameter] operator[SEP] identifier[String] identifier[param] , identifier[String] identifier[value] , identifier[String] identifier[type] , identifier[String] identifier[category] , identifier[String] identifier[name] , identifier[String] identifier[chain] , Keyword[boolean] identifier[recursive] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[long] identifier[startTime] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[Exception] identifier[exception] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[cfg] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[userDir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[setProperty] operator[SEP] literal[String] , identifier[options] operator[SEP] identifier[getExecutionDirectory] operator[SEP] operator[SEP] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[ConfigurationManager] identifier[manager] operator[=] Keyword[new] identifier[ConfigurationManager] operator[SEP] identifier[cfg] , literal[boolean] operator[SEP] operator[SEP] identifier[manager] operator[SEP] identifier[getProjectConfigurationProvider] operator[SEP] operator[SEP] operator[SEP] identifier[addConfigurationParameter] operator[SEP] identifier[param] , identifier[value] , identifier[type] , identifier[category] , identifier[name] , identifier[chain] , identifier[recursive] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[exception] operator[=] identifier[e] operator[SEP] } Keyword[finally] { identifier[System] operator[SEP] identifier[setProperty] operator[SEP] literal[String] , identifier[userDir] operator[SEP] operator[SEP] identifier[updateMsg] operator[SEP] identifier[startTime] , identifier[exception] operator[SEP] operator[SEP] } } }
public int spanAndCount(CharSequence s, int start, SpanCondition spanCondition, OutputInt outCount) { if (spanCondition == SpanCondition.NOT_CONTAINED) { return spanNot(s, start, outCount); } // Consider strings; they may overlap with the span, // and they may result in a smaller count that with just code points. if (spanCondition == SpanCondition.CONTAINED) { return spanContainedAndCount(s, start, outCount); } // SIMPLE (not synchronized, does not use offsets) int stringsLength = strings.size(); int length = s.length(); int pos = start; int rest = length - start; int count = 0; while (rest != 0) { // Try to match the next code point. int cpLength = spanOne(spanSet, s, pos, rest); int maxInc = (cpLength > 0) ? cpLength : 0; // Try to match all of the strings. for (int i = 0; i < stringsLength; ++i) { String string = strings.get(i); int length16 = string.length(); if (maxInc < length16 && length16 <= rest && matches16CPB(s, pos, length, string, length16)) { maxInc = length16; } } // We are done if there is no match beyond pos. if (maxInc == 0) { outCount.value = count; return pos; } // Continue from the longest match. ++count; pos += maxInc; rest -= maxInc; } outCount.value = count; return pos; }
class class_name[name] begin[{] method[spanAndCount, return_type[type[int]], modifier[public], parameter[s, start, spanCondition, outCount]] begin[{] if[binary_operation[member[.spanCondition], ==, member[SpanCondition.NOT_CONTAINED]]] begin[{] return[call[.spanNot, parameter[member[.s], member[.start], member[.outCount]]]] else begin[{] None end[}] if[binary_operation[member[.spanCondition], ==, member[SpanCondition.CONTAINED]]] begin[{] return[call[.spanContainedAndCount, parameter[member[.s], member[.start], member[.outCount]]]] else begin[{] None end[}] local_variable[type[int], stringsLength] local_variable[type[int], length] local_variable[type[int], pos] local_variable[type[int], rest] local_variable[type[int], count] while[binary_operation[member[.rest], !=, literal[0]]] begin[{] local_variable[type[int], cpLength] local_variable[type[int], maxInc] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=strings, selectors=[], type_arguments=None), name=string)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), name=length16)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=maxInc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length16, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=length16, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=rest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operandr=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=length16, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matches16CPB, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=maxInc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=length16, 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=stringsLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) if[binary_operation[member[.maxInc], ==, literal[0]]] begin[{] assign[member[outCount.value], member[.count]] return[member[.pos]] else begin[{] None end[}] member[.count] assign[member[.pos], member[.maxInc]] assign[member[.rest], member[.maxInc]] end[}] assign[member[outCount.value], member[.count]] return[member[.pos]] end[}] END[}]
Keyword[public] Keyword[int] identifier[spanAndCount] operator[SEP] identifier[CharSequence] identifier[s] , Keyword[int] identifier[start] , identifier[SpanCondition] identifier[spanCondition] , identifier[OutputInt] identifier[outCount] operator[SEP] { Keyword[if] operator[SEP] identifier[spanCondition] operator[==] identifier[SpanCondition] operator[SEP] identifier[NOT_CONTAINED] operator[SEP] { Keyword[return] identifier[spanNot] operator[SEP] identifier[s] , identifier[start] , identifier[outCount] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[spanCondition] operator[==] identifier[SpanCondition] operator[SEP] identifier[CONTAINED] operator[SEP] { Keyword[return] identifier[spanContainedAndCount] operator[SEP] identifier[s] , identifier[start] , identifier[outCount] operator[SEP] operator[SEP] } Keyword[int] identifier[stringsLength] operator[=] identifier[strings] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[length] operator[=] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[pos] operator[=] identifier[start] operator[SEP] Keyword[int] identifier[rest] operator[=] identifier[length] operator[-] identifier[start] operator[SEP] Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[rest] operator[!=] Other[0] operator[SEP] { Keyword[int] identifier[cpLength] operator[=] identifier[spanOne] operator[SEP] identifier[spanSet] , identifier[s] , identifier[pos] , identifier[rest] operator[SEP] operator[SEP] Keyword[int] identifier[maxInc] operator[=] operator[SEP] identifier[cpLength] operator[>] Other[0] operator[SEP] operator[?] identifier[cpLength] operator[:] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[stringsLength] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[String] identifier[string] operator[=] identifier[strings] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[int] identifier[length16] operator[=] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[maxInc] operator[<] identifier[length16] operator[&&] identifier[length16] operator[<=] identifier[rest] operator[&&] identifier[matches16CPB] operator[SEP] identifier[s] , identifier[pos] , identifier[length] , identifier[string] , identifier[length16] operator[SEP] operator[SEP] { identifier[maxInc] operator[=] identifier[length16] operator[SEP] } } Keyword[if] operator[SEP] identifier[maxInc] operator[==] Other[0] operator[SEP] { identifier[outCount] operator[SEP] identifier[value] operator[=] identifier[count] operator[SEP] Keyword[return] identifier[pos] operator[SEP] } operator[++] identifier[count] operator[SEP] identifier[pos] operator[+=] identifier[maxInc] operator[SEP] identifier[rest] operator[-=] identifier[maxInc] operator[SEP] } identifier[outCount] operator[SEP] identifier[value] operator[=] identifier[count] operator[SEP] Keyword[return] identifier[pos] operator[SEP] }
@Override public void writeFragmentTo(MwsWriter w) { w.write("Locale", locale); w.write("Text", text); }
class class_name[name] begin[{] method[writeFragmentTo, return_type[void], modifier[public], parameter[w]] begin[{] call[w.write, parameter[literal["Locale"], member[.locale]]] call[w.write, parameter[literal["Text"], member[.text]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[writeFragmentTo] operator[SEP] identifier[MwsWriter] identifier[w] operator[SEP] { identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[locale] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[text] operator[SEP] operator[SEP] }
private InstrumentationActions calculateTransformationParameters(byte[] classfileBuffer, Configuration configuration) { DiscoveryClassVisitor discoveryClassVisitor = new DiscoveryClassVisitor(configuration); new ClassReader(classfileBuffer).accept(discoveryClassVisitor, 0); return discoveryClassVisitor.getTransformationParameters().build(); }
class class_name[name] begin[{] method[calculateTransformationParameters, return_type[type[InstrumentationActions]], modifier[private], parameter[classfileBuffer, configuration]] begin[{] local_variable[type[DiscoveryClassVisitor], discoveryClassVisitor] ClassCreator(arguments=[MemberReference(member=classfileBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=discoveryClassVisitor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=accept, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ClassReader, sub_type=None)) return[call[discoveryClassVisitor.getTransformationParameters, parameter[]]] end[}] END[}]
Keyword[private] identifier[InstrumentationActions] identifier[calculateTransformationParameters] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[classfileBuffer] , identifier[Configuration] identifier[configuration] operator[SEP] { identifier[DiscoveryClassVisitor] identifier[discoveryClassVisitor] operator[=] Keyword[new] identifier[DiscoveryClassVisitor] operator[SEP] identifier[configuration] operator[SEP] operator[SEP] Keyword[new] identifier[ClassReader] operator[SEP] identifier[classfileBuffer] operator[SEP] operator[SEP] identifier[accept] operator[SEP] identifier[discoveryClassVisitor] , Other[0] operator[SEP] operator[SEP] Keyword[return] identifier[discoveryClassVisitor] operator[SEP] identifier[getTransformationParameters] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public int compareTo(Day object) { if (object == null) throw new IllegalArgumentException("day cannot be null"); Day day = (Day)object; return localDate.compareTo(day.localDate); }
class class_name[name] begin[{] method[compareTo, return_type[type[int]], modifier[public], parameter[object]] begin[{] if[binary_operation[member[.object], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="day cannot be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Day], day] return[call[localDate.compareTo, parameter[member[day.localDate]]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[Day] identifier[object] operator[SEP] { Keyword[if] operator[SEP] identifier[object] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Day] identifier[day] operator[=] operator[SEP] identifier[Day] operator[SEP] identifier[object] operator[SEP] Keyword[return] identifier[localDate] operator[SEP] identifier[compareTo] operator[SEP] identifier[day] operator[SEP] identifier[localDate] operator[SEP] operator[SEP] }
public final EObject entryRuleParenthesizedElement() throws RecognitionException { EObject current = null; EObject iv_ruleParenthesizedElement = null; try { // InternalXtext.g:2734:61: (iv_ruleParenthesizedElement= ruleParenthesizedElement EOF ) // InternalXtext.g:2735:2: iv_ruleParenthesizedElement= ruleParenthesizedElement EOF { newCompositeNode(grammarAccess.getParenthesizedElementRule()); pushFollow(FollowSets000.FOLLOW_1); iv_ruleParenthesizedElement=ruleParenthesizedElement(); state._fsp--; current =iv_ruleParenthesizedElement; match(input,EOF,FollowSets000.FOLLOW_2); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[entryRuleParenthesizedElement, return_type[type[EObject]], modifier[final public], parameter[]] begin[{] local_variable[type[EObject], current] local_variable[type[EObject], iv_ruleParenthesizedElement] TryStatement(block=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getParenthesizedElementRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_1, postfix_operators=[], prefix_operators=[], qualifier=FollowSets000, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=iv_ruleParenthesizedElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleParenthesizedElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=iv_ruleParenthesizedElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=FollowSets000, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=appendSkippedTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.current]] end[}] END[}]
Keyword[public] Keyword[final] identifier[EObject] identifier[entryRuleParenthesizedElement] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[iv_ruleParenthesizedElement] operator[=] Other[null] operator[SEP] Keyword[try] { { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getParenthesizedElementRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pushFollow] operator[SEP] identifier[FollowSets000] operator[SEP] identifier[FOLLOW_1] operator[SEP] operator[SEP] identifier[iv_ruleParenthesizedElement] operator[=] identifier[ruleParenthesizedElement] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] identifier[current] operator[=] identifier[iv_ruleParenthesizedElement] operator[SEP] identifier[match] operator[SEP] identifier[input] , identifier[EOF] , identifier[FollowSets000] operator[SEP] identifier[FOLLOW_2] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[appendSkippedTokens] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[current] operator[SEP] }
public int setSFieldValue(String strParamValue, boolean bDisplayOption, int iMoveMode) { char chFirst = 'N'; if (strParamValue != null) if (strParamValue.length() > 0) chFirst = strParamValue.charAt(0); boolean bState = false; if ((chFirst == 'T') || (chFirst == 'Y')) // True/Yes bState = true; return this.getConverter().setState(bState, bDisplayOption, iMoveMode); }
class class_name[name] begin[{] method[setSFieldValue, return_type[type[int]], modifier[public], parameter[strParamValue, bDisplayOption, iMoveMode]] begin[{] local_variable[type[char], chFirst] if[binary_operation[member[.strParamValue], !=, literal[null]]] begin[{] if[binary_operation[call[strParamValue.length, parameter[]], >, literal[0]]] begin[{] assign[member[.chFirst], call[strParamValue.charAt, parameter[literal[0]]]] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[boolean], bState] if[binary_operation[binary_operation[member[.chFirst], ==, literal['T']], ||, binary_operation[member[.chFirst], ==, literal['Y']]]] begin[{] assign[member[.bState], literal[true]] else begin[{] None end[}] return[THIS[call[None.getConverter, parameter[]]call[None.setState, parameter[member[.bState], member[.bDisplayOption], member[.iMoveMode]]]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[setSFieldValue] operator[SEP] identifier[String] identifier[strParamValue] , Keyword[boolean] identifier[bDisplayOption] , Keyword[int] identifier[iMoveMode] operator[SEP] { Keyword[char] identifier[chFirst] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[strParamValue] operator[!=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[strParamValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] identifier[chFirst] operator[=] identifier[strParamValue] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[boolean] identifier[bState] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[chFirst] operator[==] literal[String] operator[SEP] operator[||] operator[SEP] identifier[chFirst] operator[==] literal[String] operator[SEP] operator[SEP] identifier[bState] operator[=] literal[boolean] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[getConverter] operator[SEP] operator[SEP] operator[SEP] identifier[setState] operator[SEP] identifier[bState] , identifier[bDisplayOption] , identifier[iMoveMode] operator[SEP] operator[SEP] }
public Element text(String text) { Validate.notNull(text); empty(); TextNode textNode = new TextNode(text); appendChild(textNode); return this; }
class class_name[name] begin[{] method[text, return_type[type[Element]], modifier[public], parameter[text]] begin[{] call[Validate.notNull, parameter[member[.text]]] call[.empty, parameter[]] local_variable[type[TextNode], textNode] call[.appendChild, parameter[member[.textNode]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Element] identifier[text] operator[SEP] identifier[String] identifier[text] operator[SEP] { identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[text] operator[SEP] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] identifier[TextNode] identifier[textNode] operator[=] Keyword[new] identifier[TextNode] operator[SEP] identifier[text] operator[SEP] operator[SEP] identifier[appendChild] operator[SEP] identifier[textNode] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static boolean isPrimitive(Class<?> type) { return type == Class.class || type == String.class || type == Character.class || type == Character.TYPE || type == Boolean.class || type == Boolean.TYPE || type == Byte.class || type == Byte.TYPE || type == Short.class || type == Short.TYPE || type == Integer.class || type == Integer.TYPE || type == Long.class || type == Long.TYPE || type == Float.class || type == Float.TYPE || type == Double.class || type == Double.TYPE || type == Void.TYPE; }
class class_name[name] begin[{] method[isPrimitive, return_type[type[boolean]], modifier[public static], parameter[type]] begin[{] return[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Class, sub_type=None))], ||, binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]], ||, binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Character, sub_type=None))]], ||, binary_operation[member[.type], ==, member[Character.TYPE]]], ||, binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Boolean, sub_type=None))]], ||, binary_operation[member[.type], ==, member[Boolean.TYPE]]], ||, binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Byte, sub_type=None))]], ||, binary_operation[member[.type], ==, member[Byte.TYPE]]], ||, binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Short, sub_type=None))]], ||, binary_operation[member[.type], ==, member[Short.TYPE]]], ||, binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None))]], ||, binary_operation[member[.type], ==, member[Integer.TYPE]]], ||, binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Long, sub_type=None))]], ||, binary_operation[member[.type], ==, member[Long.TYPE]]], ||, binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Float, sub_type=None))]], ||, binary_operation[member[.type], ==, member[Float.TYPE]]], ||, binary_operation[member[.type], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Double, sub_type=None))]], ||, binary_operation[member[.type], ==, member[Double.TYPE]]], ||, binary_operation[member[.type], ==, member[Void.TYPE]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isPrimitive] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[SEP] { Keyword[return] identifier[type] operator[==] identifier[Class] operator[SEP] Keyword[class] operator[||] identifier[type] operator[==] identifier[String] operator[SEP] Keyword[class] operator[||] identifier[type] operator[==] identifier[Character] operator[SEP] Keyword[class] operator[||] identifier[type] operator[==] identifier[Character] operator[SEP] identifier[TYPE] operator[||] identifier[type] operator[==] identifier[Boolean] operator[SEP] Keyword[class] operator[||] identifier[type] operator[==] identifier[Boolean] operator[SEP] identifier[TYPE] operator[||] identifier[type] operator[==] identifier[Byte] operator[SEP] Keyword[class] operator[||] identifier[type] operator[==] identifier[Byte] operator[SEP] identifier[TYPE] operator[||] identifier[type] operator[==] identifier[Short] operator[SEP] Keyword[class] operator[||] identifier[type] operator[==] identifier[Short] operator[SEP] identifier[TYPE] operator[||] identifier[type] operator[==] identifier[Integer] operator[SEP] Keyword[class] operator[||] identifier[type] operator[==] identifier[Integer] operator[SEP] identifier[TYPE] operator[||] identifier[type] operator[==] identifier[Long] operator[SEP] Keyword[class] operator[||] identifier[type] operator[==] identifier[Long] operator[SEP] identifier[TYPE] operator[||] identifier[type] operator[==] identifier[Float] operator[SEP] Keyword[class] operator[||] identifier[type] operator[==] identifier[Float] operator[SEP] identifier[TYPE] operator[||] identifier[type] operator[==] identifier[Double] operator[SEP] Keyword[class] operator[||] identifier[type] operator[==] identifier[Double] operator[SEP] identifier[TYPE] operator[||] identifier[type] operator[==] identifier[Void] operator[SEP] identifier[TYPE] operator[SEP] }
public void setMemcachedProtocol( final String memcachedProtocol ) { if ( !PROTOCOL_TEXT.equals( memcachedProtocol ) && !PROTOCOL_BINARY.equals( memcachedProtocol ) ) { _log.warn( "Illegal memcachedProtocol " + memcachedProtocol + ", using default (" + _memcachedProtocol + ")." ); return; } _memcachedProtocol = memcachedProtocol; }
class class_name[name] begin[{] method[setMemcachedProtocol, return_type[void], modifier[public], parameter[memcachedProtocol]] begin[{] if[binary_operation[call[PROTOCOL_TEXT.equals, parameter[member[.memcachedProtocol]]], &&, call[PROTOCOL_BINARY.equals, parameter[member[.memcachedProtocol]]]]] begin[{] call[_log.warn, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["Illegal memcachedProtocol "], +, member[.memcachedProtocol]], +, literal[", using default ("]], +, member[._memcachedProtocol]], +, literal[")."]]]] return[None] else begin[{] None end[}] assign[member[._memcachedProtocol], member[.memcachedProtocol]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setMemcachedProtocol] operator[SEP] Keyword[final] identifier[String] identifier[memcachedProtocol] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[PROTOCOL_TEXT] operator[SEP] identifier[equals] operator[SEP] identifier[memcachedProtocol] operator[SEP] operator[&&] operator[!] identifier[PROTOCOL_BINARY] operator[SEP] identifier[equals] operator[SEP] identifier[memcachedProtocol] operator[SEP] operator[SEP] { identifier[_log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[memcachedProtocol] operator[+] literal[String] operator[+] identifier[_memcachedProtocol] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[_memcachedProtocol] operator[=] identifier[memcachedProtocol] operator[SEP] }
public void setEnableListeners(boolean[] rgbEnabled) { int iIndex = 0; FieldListener fieldBehavior = this.getListener(); while (fieldBehavior != null) { boolean bEnable = true; if ((rgbEnabled != null) && (iIndex < rgbEnabled.length)) bEnable = rgbEnabled[iIndex]; fieldBehavior.setEnabledListener(bEnable); fieldBehavior = (FieldListener)fieldBehavior.getNextListener(); iIndex++; } }
class class_name[name] begin[{] method[setEnableListeners, return_type[void], modifier[public], parameter[rgbEnabled]] begin[{] local_variable[type[int], iIndex] local_variable[type[FieldListener], fieldBehavior] while[binary_operation[member[.fieldBehavior], !=, literal[null]]] begin[{] local_variable[type[boolean], bEnable] if[binary_operation[binary_operation[member[.rgbEnabled], !=, literal[null]], &&, binary_operation[member[.iIndex], <, member[rgbEnabled.length]]]] begin[{] assign[member[.bEnable], member[.rgbEnabled]] else begin[{] None end[}] call[fieldBehavior.setEnabledListener, parameter[member[.bEnable]]] assign[member[.fieldBehavior], Cast(expression=MethodInvocation(arguments=[], member=getNextListener, postfix_operators=[], prefix_operators=[], qualifier=fieldBehavior, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=FieldListener, sub_type=None))] member[.iIndex] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setEnableListeners] operator[SEP] Keyword[boolean] operator[SEP] operator[SEP] identifier[rgbEnabled] operator[SEP] { Keyword[int] identifier[iIndex] operator[=] Other[0] operator[SEP] identifier[FieldListener] identifier[fieldBehavior] operator[=] Keyword[this] operator[SEP] identifier[getListener] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[fieldBehavior] operator[!=] Other[null] operator[SEP] { Keyword[boolean] identifier[bEnable] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[rgbEnabled] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[iIndex] operator[<] identifier[rgbEnabled] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[bEnable] operator[=] identifier[rgbEnabled] operator[SEP] identifier[iIndex] operator[SEP] operator[SEP] identifier[fieldBehavior] operator[SEP] identifier[setEnabledListener] operator[SEP] identifier[bEnable] operator[SEP] operator[SEP] identifier[fieldBehavior] operator[=] operator[SEP] identifier[FieldListener] operator[SEP] identifier[fieldBehavior] operator[SEP] identifier[getNextListener] operator[SEP] operator[SEP] operator[SEP] identifier[iIndex] operator[++] operator[SEP] } }
public int getColor(float v) { /* v *= 255; int n = (int)v; float f = v-n; if (n < 0) return map[0]; else if (n >= 255) return map[255]; return ImageMath.mixColors(f, map[n], map[n+1]); */ int n = (int)(v*255); if (n < 0) n = 0; else if (n > 255) n = 255; return map[n]; }
class class_name[name] begin[{] method[getColor, return_type[type[int]], modifier[public], parameter[v]] begin[{] local_variable[type[int], n] if[binary_operation[member[.n], <, literal[0]]] begin[{] assign[member[.n], literal[0]] else begin[{] if[binary_operation[member[.n], >, literal[255]]] begin[{] assign[member[.n], literal[255]] else begin[{] None end[}] end[}] return[member[.map]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getColor] operator[SEP] Keyword[float] identifier[v] operator[SEP] { Keyword[int] identifier[n] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[v] operator[*] Other[255] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[n] operator[<] Other[0] operator[SEP] identifier[n] operator[=] Other[0] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[n] operator[>] Other[255] operator[SEP] identifier[n] operator[=] Other[255] operator[SEP] Keyword[return] identifier[map] operator[SEP] identifier[n] operator[SEP] operator[SEP] }
public void addSession(String id, Session session) { PoolInfo poolInfo = getPoolInfo(session); LOG.info("Session " + id + " added to pool info " + poolInfo + " (originally " + session.getInfo().getPoolInfoStrings() +") for " + type); getPoolSchedulable(poolInfo).addSession(id, session); }
class class_name[name] begin[{] method[addSession, return_type[void], modifier[public], parameter[id, session]] begin[{] local_variable[type[PoolInfo], poolInfo] call[LOG.info, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["Session "], +, member[.id]], +, literal[" added to pool info "]], +, member[.poolInfo]], +, literal[" (originally "]], +, call[session.getInfo, parameter[]]], +, literal[") for "]], +, member[.type]]]] call[.getPoolSchedulable, parameter[member[.poolInfo]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addSession] operator[SEP] identifier[String] identifier[id] , identifier[Session] identifier[session] operator[SEP] { identifier[PoolInfo] identifier[poolInfo] operator[=] identifier[getPoolInfo] operator[SEP] identifier[session] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[id] operator[+] literal[String] operator[+] identifier[poolInfo] operator[+] literal[String] operator[+] identifier[session] operator[SEP] identifier[getInfo] operator[SEP] operator[SEP] operator[SEP] identifier[getPoolInfoStrings] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[type] operator[SEP] operator[SEP] identifier[getPoolSchedulable] operator[SEP] identifier[poolInfo] operator[SEP] operator[SEP] identifier[addSession] operator[SEP] identifier[id] , identifier[session] operator[SEP] operator[SEP] }
public final int size() { if (tc.isEntryEnabled()) SibTr.entry(tc, "size"); int result = (m_tail >= m_head) ? (m_tail - m_head) : (m_array.length - m_head + m_tail); if (tc.isEntryEnabled()) SibTr.exit(tc, "size", new Integer(result)); return result; }
class class_name[name] begin[{] method[size, return_type[type[int]], modifier[final public], parameter[]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["size"]]] else begin[{] None end[}] local_variable[type[int], result] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["size"], ClassCreator(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None))]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[int] identifier[size] 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] Keyword[int] identifier[result] operator[=] operator[SEP] identifier[m_tail] operator[>=] identifier[m_head] operator[SEP] operator[?] operator[SEP] identifier[m_tail] operator[-] identifier[m_head] operator[SEP] operator[:] operator[SEP] identifier[m_array] operator[SEP] identifier[length] operator[-] identifier[m_head] operator[+] identifier[m_tail] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Integer] operator[SEP] identifier[result] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
private boolean intersectsOtherTexture(RegionData data) { final Rectangle rec1 = new Rectangle(data.x, data.y, data.width, data.height); for (RegionData other : regions.values()) { final Rectangle rec2 = new Rectangle(other.x, other.y, other.width, other.height); if (rec1.intersects(rec2)) { return true; } } return false; }
class class_name[name] begin[{] method[intersectsOtherTexture, return_type[type[boolean]], modifier[private], parameter[data]] begin[{] local_variable[type[Rectangle], rec1] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=other, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=other, selectors=[]), MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=other, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=other, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Rectangle, sub_type=None)), name=rec2)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Rectangle, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=rec2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=intersects, postfix_operators=[], prefix_operators=[], qualifier=rec1, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=regions, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=other)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RegionData, sub_type=None))), label=None) return[literal[false]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[intersectsOtherTexture] operator[SEP] identifier[RegionData] identifier[data] operator[SEP] { Keyword[final] identifier[Rectangle] identifier[rec1] operator[=] Keyword[new] identifier[Rectangle] operator[SEP] identifier[data] operator[SEP] identifier[x] , identifier[data] operator[SEP] identifier[y] , identifier[data] operator[SEP] identifier[width] , identifier[data] operator[SEP] identifier[height] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[RegionData] identifier[other] operator[:] identifier[regions] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[Rectangle] identifier[rec2] operator[=] Keyword[new] identifier[Rectangle] operator[SEP] identifier[other] operator[SEP] identifier[x] , identifier[other] operator[SEP] identifier[y] , identifier[other] operator[SEP] identifier[width] , identifier[other] operator[SEP] identifier[height] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rec1] operator[SEP] identifier[intersects] operator[SEP] identifier[rec2] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public WxGroup group() { Map map = getAs("group", Map.class); if (map == null) return null; return Lang.map2Object(map, WxGroup.class); }
class class_name[name] begin[{] method[group, return_type[type[WxGroup]], modifier[public], parameter[]] begin[{] local_variable[type[Map], map] if[binary_operation[member[.map], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[Lang.map2Object, parameter[member[.map], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WxGroup, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[WxGroup] identifier[group] operator[SEP] operator[SEP] { identifier[Map] identifier[map] operator[=] identifier[getAs] operator[SEP] literal[String] , identifier[Map] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[map] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[Lang] operator[SEP] identifier[map2Object] operator[SEP] identifier[map] , identifier[WxGroup] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public <M extends net.morimekta.providence.PMessage<M, F>, F extends net.morimekta.providence.descriptor.PField> M unwrapMessage(@javax.annotation.Nonnull net.morimekta.providence.descriptor.PMessageDescriptor<M,F> descriptor) { return unwrapMessage(descriptor, new net.morimekta.providence.serializer.DefaultSerializerProvider()); }
class class_name[name] begin[{] method[unwrapMessage, return_type[type[M]], modifier[public], parameter[descriptor]] begin[{] return[call[.unwrapMessage, parameter[member[.descriptor], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=net, sub_type=ReferenceType(arguments=None, dimensions=None, name=morimekta, sub_type=ReferenceType(arguments=None, dimensions=None, name=providence, sub_type=ReferenceType(arguments=None, dimensions=None, name=serializer, sub_type=ReferenceType(arguments=None, dimensions=None, name=DefaultSerializerProvider, sub_type=None))))))]]] end[}] END[}]
Keyword[public] operator[<] identifier[M] Keyword[extends] identifier[net] operator[SEP] identifier[morimekta] operator[SEP] identifier[providence] operator[SEP] identifier[PMessage] operator[<] identifier[M] , identifier[F] operator[>] , identifier[F] Keyword[extends] identifier[net] operator[SEP] identifier[morimekta] operator[SEP] identifier[providence] operator[SEP] identifier[descriptor] operator[SEP] identifier[PField] operator[>] identifier[M] identifier[unwrapMessage] operator[SEP] annotation[@] identifier[javax] operator[SEP] identifier[annotation] operator[SEP] identifier[Nonnull] identifier[net] operator[SEP] identifier[morimekta] operator[SEP] identifier[providence] operator[SEP] identifier[descriptor] operator[SEP] identifier[PMessageDescriptor] operator[<] identifier[M] , identifier[F] operator[>] identifier[descriptor] operator[SEP] { Keyword[return] identifier[unwrapMessage] operator[SEP] identifier[descriptor] , Keyword[new] identifier[net] operator[SEP] identifier[morimekta] operator[SEP] identifier[providence] operator[SEP] identifier[serializer] operator[SEP] identifier[DefaultSerializerProvider] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public CommerceCurrency findByPrimaryKey(Serializable primaryKey) throws NoSuchCurrencyException { CommerceCurrency commerceCurrency = fetchByPrimaryKey(primaryKey); if (commerceCurrency == null) { if (_log.isDebugEnabled()) { _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); } throw new NoSuchCurrencyException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); } return commerceCurrency; }
class class_name[name] begin[{] method[findByPrimaryKey, return_type[type[CommerceCurrency]], modifier[public], parameter[primaryKey]] begin[{] local_variable[type[CommerceCurrency], commerceCurrency] if[binary_operation[member[.commerceCurrency], ==, literal[null]]] begin[{] if[call[_log.isDebugEnabled, parameter[]]] begin[{] call[_log.debug, parameter[binary_operation[member[._NO_SUCH_ENTITY_WITH_PRIMARY_KEY], +, member[.primaryKey]]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=_NO_SUCH_ENTITY_WITH_PRIMARY_KEY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=primaryKey, 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=NoSuchCurrencyException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.commerceCurrency]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommerceCurrency] identifier[findByPrimaryKey] operator[SEP] identifier[Serializable] identifier[primaryKey] operator[SEP] Keyword[throws] identifier[NoSuchCurrencyException] { identifier[CommerceCurrency] identifier[commerceCurrency] operator[=] identifier[fetchByPrimaryKey] operator[SEP] identifier[primaryKey] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[commerceCurrency] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[_log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[_log] operator[SEP] identifier[debug] operator[SEP] identifier[_NO_SUCH_ENTITY_WITH_PRIMARY_KEY] operator[+] identifier[primaryKey] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[NoSuchCurrencyException] operator[SEP] identifier[_NO_SUCH_ENTITY_WITH_PRIMARY_KEY] operator[+] identifier[primaryKey] operator[SEP] operator[SEP] } Keyword[return] identifier[commerceCurrency] operator[SEP] }
public void add(final URI uri, final HttpCookie cookie) { if(cookie.getMaxAge() == 0) { return; } if(cookie.getDomain() != null) { add(new DomainKey(cookie), cookie); } if(uri != null) { add(new UriKey(uri, cookie), cookie); } }
class class_name[name] begin[{] method[add, return_type[void], modifier[public], parameter[uri, cookie]] begin[{] if[binary_operation[call[cookie.getMaxAge, parameter[]], ==, literal[0]]] begin[{] return[None] else begin[{] None end[}] if[binary_operation[call[cookie.getDomain, parameter[]], !=, literal[null]]] begin[{] call[.add, parameter[ClassCreator(arguments=[MemberReference(member=cookie, 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=DomainKey, sub_type=None)), member[.cookie]]] else begin[{] None end[}] if[binary_operation[member[.uri], !=, literal[null]]] begin[{] call[.add, parameter[ClassCreator(arguments=[MemberReference(member=uri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cookie, 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=UriKey, sub_type=None)), member[.cookie]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[add] operator[SEP] Keyword[final] identifier[URI] identifier[uri] , Keyword[final] identifier[HttpCookie] identifier[cookie] operator[SEP] { Keyword[if] operator[SEP] identifier[cookie] operator[SEP] identifier[getMaxAge] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[cookie] operator[SEP] identifier[getDomain] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[add] operator[SEP] Keyword[new] identifier[DomainKey] operator[SEP] identifier[cookie] operator[SEP] , identifier[cookie] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[uri] operator[!=] Other[null] operator[SEP] { identifier[add] operator[SEP] Keyword[new] identifier[UriKey] operator[SEP] identifier[uri] , identifier[cookie] operator[SEP] , identifier[cookie] operator[SEP] operator[SEP] } }
public void print(IncidentStream is, int maxDepth) { StringBuffer fullName = new StringBuffer(); for (int i = 0; i < _level; i++) fullName.append(" "); fullName.append(_name); is.writeLine(fullName.toString(), _description); if (_level < maxDepth) { List<IntrospectionLevelMember> children = getChildren(); for (IntrospectionLevelMember ilm : children) { ilm.print(is, maxDepth); } } }
class class_name[name] begin[{] method[print, return_type[void], modifier[public], parameter[is, maxDepth]] begin[{] local_variable[type[StringBuffer], fullName] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=fullName, selectors=[], type_arguments=None), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=_level, 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) call[fullName.append, parameter[member[._name]]] call[is.writeLine, parameter[call[fullName.toString, parameter[]], member[._description]]] if[binary_operation[member[._level], <, member[.maxDepth]]] begin[{] local_variable[type[List], children] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxDepth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=print, postfix_operators=[], prefix_operators=[], qualifier=ilm, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=children, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ilm)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IntrospectionLevelMember, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[print] operator[SEP] identifier[IncidentStream] identifier[is] , Keyword[int] identifier[maxDepth] operator[SEP] { identifier[StringBuffer] identifier[fullName] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[_level] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[fullName] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[fullName] operator[SEP] identifier[append] operator[SEP] identifier[_name] operator[SEP] operator[SEP] identifier[is] operator[SEP] identifier[writeLine] operator[SEP] identifier[fullName] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[_description] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_level] operator[<] identifier[maxDepth] operator[SEP] { identifier[List] operator[<] identifier[IntrospectionLevelMember] operator[>] identifier[children] operator[=] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[IntrospectionLevelMember] identifier[ilm] operator[:] identifier[children] operator[SEP] { identifier[ilm] operator[SEP] identifier[print] operator[SEP] identifier[is] , identifier[maxDepth] operator[SEP] operator[SEP] } } }
@Override public final JmsBodyType getBodyType() { /* Get the subtype and get the corresponding JmsBodyType to return */ int bType = getSubtype(); return JmsBodyType.getJmsBodyType(Byte.valueOf((byte) bType)); }
class class_name[name] begin[{] method[getBodyType, return_type[type[JmsBodyType]], modifier[final public], parameter[]] begin[{] local_variable[type[int], bType] return[call[JmsBodyType.getJmsBodyType, parameter[call[Byte.valueOf, parameter[Cast(expression=MemberReference(member=bType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[JmsBodyType] identifier[getBodyType] operator[SEP] operator[SEP] { Keyword[int] identifier[bType] operator[=] identifier[getSubtype] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[JmsBodyType] operator[SEP] identifier[getJmsBodyType] operator[SEP] identifier[Byte] operator[SEP] identifier[valueOf] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] identifier[bType] operator[SEP] operator[SEP] operator[SEP] }
public void processDecodes(FacesContext context) { if (context == null) { throw new NullPointerException(); } // Skip processing if our rendered flag is false if (!isRendered()) { return; } super.processDecodes(context); if (isImmediate()) { executeValidate(context); } }
class class_name[name] begin[{] method[processDecodes, return_type[void], modifier[public], parameter[context]] begin[{] if[binary_operation[member[.context], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] if[call[.isRendered, parameter[]]] begin[{] return[None] else begin[{] None end[}] SuperMethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processDecodes, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) if[call[.isImmediate, parameter[]]] begin[{] call[.executeValidate, parameter[member[.context]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[processDecodes] operator[SEP] identifier[FacesContext] identifier[context] operator[SEP] { Keyword[if] operator[SEP] identifier[context] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[isRendered] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } Keyword[super] operator[SEP] identifier[processDecodes] operator[SEP] identifier[context] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isImmediate] operator[SEP] operator[SEP] operator[SEP] { identifier[executeValidate] operator[SEP] identifier[context] operator[SEP] operator[SEP] } }
public Message build() { String message = builder.toString(); if (this.isEmpty()) throw new IllegalStateException("Cannot build a Message with no content. (You never added any content to the message)"); if (message.length() > Message.MAX_CONTENT_LENGTH) throw new IllegalStateException("Cannot build a Message with more than 2000 characters. Please limit your input."); return new DataMessage(isTTS, message, nonce, embed); }
class class_name[name] begin[{] method[build, return_type[type[Message]], modifier[public], parameter[]] begin[{] local_variable[type[String], message] if[THIS[call[None.isEmpty, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot build a Message with no content. (You never added any content to the message)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[call[message.length, parameter[]], >, member[Message.MAX_CONTENT_LENGTH]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot build a Message with more than 2000 characters. Please limit your input.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=isTTS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nonce, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=embed, 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=DataMessage, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Message] identifier[build] operator[SEP] operator[SEP] { identifier[String] identifier[message] operator[=] identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[message] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] identifier[Message] operator[SEP] identifier[MAX_CONTENT_LENGTH] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[DataMessage] operator[SEP] identifier[isTTS] , identifier[message] , identifier[nonce] , identifier[embed] operator[SEP] operator[SEP] }
protected LocPathIterator changePartToRef(final QName uniquePseudoVarName, WalkingIterator wi, final int numSteps, final boolean isGlobal) { Variable var = new Variable(); var.setQName(uniquePseudoVarName); var.setIsGlobal(isGlobal); if(isGlobal) { ElemTemplateElement elem = getElemFromExpression(wi); StylesheetRoot root = elem.getStylesheetRoot(); Vector vars = root.getVariablesAndParamsComposed(); var.setIndex(vars.size()-1); } // Walk to the first walker after the one's we are replacing. AxesWalker walker = wi.getFirstWalker(); for(int i = 0; i < numSteps; i++) { assertion(null != walker, "Walker should not be null!"); walker = walker.getNextWalker(); } if(null != walker) { FilterExprWalker few = new FilterExprWalker(wi); few.setInnerExpression(var); few.exprSetParent(wi); few.setNextWalker(walker); walker.setPrevWalker(few); wi.setFirstWalker(few); return wi; } else { FilterExprIteratorSimple feis = new FilterExprIteratorSimple(var); feis.exprSetParent(wi.exprGetParent()); return feis; } }
class class_name[name] begin[{] method[changePartToRef, return_type[type[LocPathIterator]], modifier[protected], parameter[uniquePseudoVarName, wi, numSteps, isGlobal]] begin[{] local_variable[type[Variable], var] call[var.setQName, parameter[member[.uniquePseudoVarName]]] call[var.setIsGlobal, parameter[member[.isGlobal]]] if[member[.isGlobal]] begin[{] local_variable[type[ElemTemplateElement], elem] local_variable[type[StylesheetRoot], root] local_variable[type[Vector], vars] call[var.setIndex, parameter[binary_operation[call[vars.size, parameter[]], -, literal[1]]]] else begin[{] None end[}] local_variable[type[AxesWalker], walker] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=walker, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Walker should not be null!")], member=assertion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=walker, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getNextWalker, postfix_operators=[], prefix_operators=[], qualifier=walker, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numSteps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[literal[null], !=, member[.walker]]] begin[{] local_variable[type[FilterExprWalker], few] call[few.setInnerExpression, parameter[member[.var]]] call[few.exprSetParent, parameter[member[.wi]]] call[few.setNextWalker, parameter[member[.walker]]] call[walker.setPrevWalker, parameter[member[.few]]] call[wi.setFirstWalker, parameter[member[.few]]] return[member[.wi]] else begin[{] local_variable[type[FilterExprIteratorSimple], feis] call[feis.exprSetParent, parameter[call[wi.exprGetParent, parameter[]]]] return[member[.feis]] end[}] end[}] END[}]
Keyword[protected] identifier[LocPathIterator] identifier[changePartToRef] operator[SEP] Keyword[final] identifier[QName] identifier[uniquePseudoVarName] , identifier[WalkingIterator] identifier[wi] , Keyword[final] Keyword[int] identifier[numSteps] , Keyword[final] Keyword[boolean] identifier[isGlobal] operator[SEP] { identifier[Variable] identifier[var] operator[=] Keyword[new] identifier[Variable] operator[SEP] operator[SEP] operator[SEP] identifier[var] operator[SEP] identifier[setQName] operator[SEP] identifier[uniquePseudoVarName] operator[SEP] operator[SEP] identifier[var] operator[SEP] identifier[setIsGlobal] operator[SEP] identifier[isGlobal] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isGlobal] operator[SEP] { identifier[ElemTemplateElement] identifier[elem] operator[=] identifier[getElemFromExpression] operator[SEP] identifier[wi] operator[SEP] operator[SEP] identifier[StylesheetRoot] identifier[root] operator[=] identifier[elem] operator[SEP] identifier[getStylesheetRoot] operator[SEP] operator[SEP] operator[SEP] identifier[Vector] identifier[vars] operator[=] identifier[root] operator[SEP] identifier[getVariablesAndParamsComposed] operator[SEP] operator[SEP] operator[SEP] identifier[var] operator[SEP] identifier[setIndex] operator[SEP] identifier[vars] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } identifier[AxesWalker] identifier[walker] operator[=] identifier[wi] operator[SEP] identifier[getFirstWalker] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numSteps] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[assertion] operator[SEP] Other[null] operator[!=] identifier[walker] , literal[String] operator[SEP] operator[SEP] identifier[walker] operator[=] identifier[walker] operator[SEP] identifier[getNextWalker] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Other[null] operator[!=] identifier[walker] operator[SEP] { identifier[FilterExprWalker] identifier[few] operator[=] Keyword[new] identifier[FilterExprWalker] operator[SEP] identifier[wi] operator[SEP] operator[SEP] identifier[few] operator[SEP] identifier[setInnerExpression] operator[SEP] identifier[var] operator[SEP] operator[SEP] identifier[few] operator[SEP] identifier[exprSetParent] operator[SEP] identifier[wi] operator[SEP] operator[SEP] identifier[few] operator[SEP] identifier[setNextWalker] operator[SEP] identifier[walker] operator[SEP] operator[SEP] identifier[walker] operator[SEP] identifier[setPrevWalker] operator[SEP] identifier[few] operator[SEP] operator[SEP] identifier[wi] operator[SEP] identifier[setFirstWalker] operator[SEP] identifier[few] operator[SEP] operator[SEP] Keyword[return] identifier[wi] operator[SEP] } Keyword[else] { identifier[FilterExprIteratorSimple] identifier[feis] operator[=] Keyword[new] identifier[FilterExprIteratorSimple] operator[SEP] identifier[var] operator[SEP] operator[SEP] identifier[feis] operator[SEP] identifier[exprSetParent] operator[SEP] identifier[wi] operator[SEP] identifier[exprGetParent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[feis] operator[SEP] } }
public String hashCodeList(List<RecordTemplateSpec.Field> fields) { StringBuilder sb = new StringBuilder(); Iterator<RecordTemplateSpec.Field> iter = fields.iterator(); while(iter.hasNext()) { RecordTemplateSpec.Field field = iter.next(); Type schemaType = field.getSchemaField().getType().getType(); sb.append(escapeKeyword(field.getSchemaField().getName())); if (iter.hasNext()) sb.append(", "); } return sb.toString(); }
class class_name[name] begin[{] method[hashCodeList, return_type[type[String]], modifier[public], parameter[fields]] begin[{] local_variable[type[StringBuilder], sb] local_variable[type[Iterator], iter] while[call[iter.hasNext, parameter[]]] begin[{] local_variable[type[RecordTemplateSpec], field] local_variable[type[Type], schemaType] call[sb.append, parameter[call[.escapeKeyword, parameter[call[field.getSchemaField, parameter[]]]]]] if[call[iter.hasNext, parameter[]]] begin[{] call[sb.append, parameter[literal[", "]]] else begin[{] None end[}] end[}] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[hashCodeList] operator[SEP] identifier[List] operator[<] identifier[RecordTemplateSpec] operator[SEP] identifier[Field] operator[>] identifier[fields] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[RecordTemplateSpec] operator[SEP] identifier[Field] operator[>] identifier[iter] operator[=] identifier[fields] 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[RecordTemplateSpec] operator[SEP] identifier[Field] identifier[field] operator[=] identifier[iter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[Type] identifier[schemaType] operator[=] identifier[field] operator[SEP] identifier[getSchemaField] operator[SEP] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[escapeKeyword] operator[SEP] identifier[field] operator[SEP] identifier[getSchemaField] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[iter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void release(InputStream inputStream) throws IOException { // for non-seekable input stream, close and return if (!(inputStream instanceof CachedSeekableInputStream) || !CACHE_ENABLED) { inputStream.close(); return; } synchronized (mFileIdToInputStreamIds) { if (!mFileIdToInputStreamIds .containsKey(((CachedSeekableInputStream) inputStream).getFileId())) { LOG.debug("The resource {} is already expired", ((CachedSeekableInputStream) inputStream).getResourceId()); // the cache no longer tracks this input stream inputStream.close(); return; } UfsInputStreamIdSet resources = mFileIdToInputStreamIds.get(((CachedSeekableInputStream) inputStream).getFileId()); if (!resources.release(((CachedSeekableInputStream) inputStream).getResourceId())) { LOG.debug("Close the expired input stream resource of {}", ((CachedSeekableInputStream) inputStream).getResourceId()); // the input stream expired, close it inputStream.close(); } } }
class class_name[name] begin[{] method[release, return_type[void], modifier[public], parameter[inputStream]] begin[{] if[binary_operation[binary_operation[member[.inputStream], instanceof, type[CachedSeekableInputStream]], ||, member[.CACHE_ENABLED]]] begin[{] call[inputStream.close, parameter[]] return[None] else begin[{] None end[}] SYNCHRONIZED[member[.mFileIdToInputStreamIds]] BEGIN[{] if[call[mFileIdToInputStreamIds.containsKey, parameter[Cast(expression=MemberReference(member=inputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=CachedSeekableInputStream, sub_type=None))]]] begin[{] call[LOG.debug, parameter[literal["The resource {} is already expired"], Cast(expression=MemberReference(member=inputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=CachedSeekableInputStream, sub_type=None))]] call[inputStream.close, parameter[]] return[None] else begin[{] None end[}] local_variable[type[UfsInputStreamIdSet], resources] if[call[resources.release, parameter[Cast(expression=MemberReference(member=inputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=CachedSeekableInputStream, sub_type=None))]]] begin[{] call[LOG.debug, parameter[literal["Close the expired input stream resource of {}"], Cast(expression=MemberReference(member=inputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=CachedSeekableInputStream, sub_type=None))]] call[inputStream.close, parameter[]] else begin[{] None end[}] END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[release] operator[SEP] identifier[InputStream] identifier[inputStream] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[inputStream] Keyword[instanceof] identifier[CachedSeekableInputStream] operator[SEP] operator[||] operator[!] identifier[CACHE_ENABLED] operator[SEP] { identifier[inputStream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[synchronized] operator[SEP] identifier[mFileIdToInputStreamIds] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[mFileIdToInputStreamIds] operator[SEP] identifier[containsKey] operator[SEP] operator[SEP] operator[SEP] identifier[CachedSeekableInputStream] operator[SEP] identifier[inputStream] operator[SEP] operator[SEP] identifier[getFileId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , operator[SEP] operator[SEP] identifier[CachedSeekableInputStream] operator[SEP] identifier[inputStream] operator[SEP] operator[SEP] identifier[getResourceId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[inputStream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[UfsInputStreamIdSet] identifier[resources] operator[=] identifier[mFileIdToInputStreamIds] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[CachedSeekableInputStream] operator[SEP] identifier[inputStream] operator[SEP] operator[SEP] identifier[getFileId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[resources] operator[SEP] identifier[release] operator[SEP] operator[SEP] operator[SEP] identifier[CachedSeekableInputStream] operator[SEP] identifier[inputStream] operator[SEP] operator[SEP] identifier[getResourceId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , operator[SEP] operator[SEP] identifier[CachedSeekableInputStream] operator[SEP] identifier[inputStream] operator[SEP] operator[SEP] identifier[getResourceId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[inputStream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } }
public void stopAll() { Iterator<GatewayEntry> it = getEntries().values().iterator(); Gateway g; while (it.hasNext()) { g = it.next().getGateway(); if (g != null) stop(g); } }
class class_name[name] begin[{] method[stopAll, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[Iterator], it] local_variable[type[Gateway], g] while[call[it.hasNext, parameter[]]] begin[{] assign[member[.g], call[it.next, parameter[]]] if[binary_operation[member[.g], !=, literal[null]]] begin[{] call[.stop, parameter[member[.g]]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[stopAll] operator[SEP] operator[SEP] { identifier[Iterator] operator[<] identifier[GatewayEntry] operator[>] identifier[it] operator[=] identifier[getEntries] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[Gateway] identifier[g] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[g] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[getGateway] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[g] operator[!=] Other[null] operator[SEP] identifier[stop] operator[SEP] identifier[g] operator[SEP] operator[SEP] } }
protected Content getFrameDetails() { HtmlTree leftContainerDiv = new HtmlTree(HtmlTag.DIV); HtmlTree rightContainerDiv = new HtmlTree(HtmlTag.DIV); leftContainerDiv.addStyle(HtmlStyle.leftContainer); rightContainerDiv.addStyle(HtmlStyle.rightContainer); if (noOfPackages <= 1) { addAllClassesFrameTag(leftContainerDiv); } else if (noOfPackages > 1) { addAllPackagesFrameTag(leftContainerDiv); addAllClassesFrameTag(leftContainerDiv); } addClassFrameTag(rightContainerDiv); HtmlTree mainContainer = HtmlTree.DIV(HtmlStyle.mainContainer, leftContainerDiv); mainContainer.addContent(rightContainerDiv); return mainContainer; }
class class_name[name] begin[{] method[getFrameDetails, return_type[type[Content]], modifier[protected], parameter[]] begin[{] local_variable[type[HtmlTree], leftContainerDiv] local_variable[type[HtmlTree], rightContainerDiv] call[leftContainerDiv.addStyle, parameter[member[HtmlStyle.leftContainer]]] call[rightContainerDiv.addStyle, parameter[member[HtmlStyle.rightContainer]]] if[binary_operation[member[.noOfPackages], <=, literal[1]]] begin[{] call[.addAllClassesFrameTag, parameter[member[.leftContainerDiv]]] else begin[{] if[binary_operation[member[.noOfPackages], >, literal[1]]] begin[{] call[.addAllPackagesFrameTag, parameter[member[.leftContainerDiv]]] call[.addAllClassesFrameTag, parameter[member[.leftContainerDiv]]] else begin[{] None end[}] end[}] call[.addClassFrameTag, parameter[member[.rightContainerDiv]]] local_variable[type[HtmlTree], mainContainer] call[mainContainer.addContent, parameter[member[.rightContainerDiv]]] return[member[.mainContainer]] end[}] END[}]
Keyword[protected] identifier[Content] identifier[getFrameDetails] operator[SEP] operator[SEP] { identifier[HtmlTree] identifier[leftContainerDiv] operator[=] Keyword[new] identifier[HtmlTree] operator[SEP] identifier[HtmlTag] operator[SEP] identifier[DIV] operator[SEP] operator[SEP] identifier[HtmlTree] identifier[rightContainerDiv] operator[=] Keyword[new] identifier[HtmlTree] operator[SEP] identifier[HtmlTag] operator[SEP] identifier[DIV] operator[SEP] operator[SEP] identifier[leftContainerDiv] operator[SEP] identifier[addStyle] operator[SEP] identifier[HtmlStyle] operator[SEP] identifier[leftContainer] operator[SEP] operator[SEP] identifier[rightContainerDiv] operator[SEP] identifier[addStyle] operator[SEP] identifier[HtmlStyle] operator[SEP] identifier[rightContainer] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[noOfPackages] operator[<=] Other[1] operator[SEP] { identifier[addAllClassesFrameTag] operator[SEP] identifier[leftContainerDiv] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[noOfPackages] operator[>] Other[1] operator[SEP] { identifier[addAllPackagesFrameTag] operator[SEP] identifier[leftContainerDiv] operator[SEP] operator[SEP] identifier[addAllClassesFrameTag] operator[SEP] identifier[leftContainerDiv] operator[SEP] operator[SEP] } identifier[addClassFrameTag] operator[SEP] identifier[rightContainerDiv] operator[SEP] operator[SEP] identifier[HtmlTree] identifier[mainContainer] operator[=] identifier[HtmlTree] operator[SEP] identifier[DIV] operator[SEP] identifier[HtmlStyle] operator[SEP] identifier[mainContainer] , identifier[leftContainerDiv] operator[SEP] operator[SEP] identifier[mainContainer] operator[SEP] identifier[addContent] operator[SEP] identifier[rightContainerDiv] operator[SEP] operator[SEP] Keyword[return] identifier[mainContainer] operator[SEP] }
private String getSharedAccessCanonicalName() { String accountName = this.getServiceClient().getCredentials().getAccountName(); String tableNameLowerCase = this.getName().toLowerCase(Locale.ENGLISH); return String.format("/%s/%s/%s", SR.TABLE, accountName, tableNameLowerCase); }
class class_name[name] begin[{] method[getSharedAccessCanonicalName, return_type[type[String]], modifier[private], parameter[]] begin[{] local_variable[type[String], accountName] local_variable[type[String], tableNameLowerCase] return[call[String.format, parameter[literal["/%s/%s/%s"], member[SR.TABLE], member[.accountName], member[.tableNameLowerCase]]]] end[}] END[}]
Keyword[private] identifier[String] identifier[getSharedAccessCanonicalName] operator[SEP] operator[SEP] { identifier[String] identifier[accountName] operator[=] Keyword[this] operator[SEP] identifier[getServiceClient] operator[SEP] operator[SEP] operator[SEP] identifier[getCredentials] operator[SEP] operator[SEP] operator[SEP] identifier[getAccountName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[tableNameLowerCase] operator[=] Keyword[this] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[Locale] operator[SEP] identifier[ENGLISH] operator[SEP] operator[SEP] Keyword[return] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[SR] operator[SEP] identifier[TABLE] , identifier[accountName] , identifier[tableNameLowerCase] operator[SEP] operator[SEP] }
public static void handleDomainOperationResponseStreams(final OperationContext context, final ModelNode responseNode, final List<OperationResponse.StreamEntry> streams) { if (responseNode.hasDefined(RESPONSE_HEADERS)) { ModelNode responseHeaders = responseNode.get(RESPONSE_HEADERS); // Strip out any stream header as the header created by this process is what counts responseHeaders.remove(ATTACHED_STREAMS); if (responseHeaders.asInt() == 0) { responseNode.remove(RESPONSE_HEADERS); } } for (OperationResponse.StreamEntry streamEntry : streams) { context.attachResultStream(streamEntry.getUUID(), streamEntry.getMimeType(), streamEntry.getStream()); } }
class class_name[name] begin[{] method[handleDomainOperationResponseStreams, return_type[void], modifier[public static], parameter[context, responseNode, streams]] begin[{] if[call[responseNode.hasDefined, parameter[member[.RESPONSE_HEADERS]]]] begin[{] local_variable[type[ModelNode], responseHeaders] call[responseHeaders.remove, parameter[member[.ATTACHED_STREAMS]]] if[binary_operation[call[responseHeaders.asInt, parameter[]], ==, literal[0]]] begin[{] call[responseNode.remove, parameter[member[.RESPONSE_HEADERS]]] else begin[{] None end[}] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getUUID, postfix_operators=[], prefix_operators=[], qualifier=streamEntry, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getMimeType, postfix_operators=[], prefix_operators=[], qualifier=streamEntry, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getStream, postfix_operators=[], prefix_operators=[], qualifier=streamEntry, selectors=[], type_arguments=None)], member=attachResultStream, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=streams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=streamEntry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OperationResponse, sub_type=ReferenceType(arguments=None, dimensions=None, name=StreamEntry, sub_type=None)))), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[handleDomainOperationResponseStreams] operator[SEP] Keyword[final] identifier[OperationContext] identifier[context] , Keyword[final] identifier[ModelNode] identifier[responseNode] , Keyword[final] identifier[List] operator[<] identifier[OperationResponse] operator[SEP] identifier[StreamEntry] operator[>] identifier[streams] operator[SEP] { Keyword[if] operator[SEP] identifier[responseNode] operator[SEP] identifier[hasDefined] operator[SEP] identifier[RESPONSE_HEADERS] operator[SEP] operator[SEP] { identifier[ModelNode] identifier[responseHeaders] operator[=] identifier[responseNode] operator[SEP] identifier[get] operator[SEP] identifier[RESPONSE_HEADERS] operator[SEP] operator[SEP] identifier[responseHeaders] operator[SEP] identifier[remove] operator[SEP] identifier[ATTACHED_STREAMS] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[responseHeaders] operator[SEP] identifier[asInt] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[responseNode] operator[SEP] identifier[remove] operator[SEP] identifier[RESPONSE_HEADERS] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[OperationResponse] operator[SEP] identifier[StreamEntry] identifier[streamEntry] operator[:] identifier[streams] operator[SEP] { identifier[context] operator[SEP] identifier[attachResultStream] operator[SEP] identifier[streamEntry] operator[SEP] identifier[getUUID] operator[SEP] operator[SEP] , identifier[streamEntry] operator[SEP] identifier[getMimeType] operator[SEP] operator[SEP] , identifier[streamEntry] operator[SEP] identifier[getStream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public void write(int v) throws IOException { byte b[] = new byte[1]; b[0] = (byte) v; pos += blob.write(b, 0, pos, 1); }
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[v]] begin[{] local_variable[type[byte], b] assign[member[.b], Cast(expression=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] assign[member[.pos], call[blob.write, parameter[member[.b], literal[0], member[.pos], literal[1]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[int] identifier[v] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[byte] identifier[b] operator[SEP] operator[SEP] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[b] operator[SEP] Other[0] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[v] operator[SEP] identifier[pos] operator[+=] identifier[blob] operator[SEP] identifier[write] operator[SEP] identifier[b] , Other[0] , identifier[pos] , Other[1] operator[SEP] operator[SEP] }